Skip to content

Commit

Permalink
update r829
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Apr 23, 2015
1 parent 1fba58b commit aab1cbc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/iutest_unit_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,25 @@ IUTEST(UnitTest, XmlEscape)
, HackXmlGeneratorListener::EscapeXmlText("a<> b& \'\"c\r\n"));
}

IUTEST(UnitTest, FileLocqtion)
{
::iutest::IUTEST_FLAG(file_location_style_msvc) = false;
IUTEST_EXPECT_STREQ("main.cpp:1"
, ::iutest::detail::FormatFileLocation("main.cpp", 1) );
IUTEST_EXPECT_STREQ("unknown file:1"
, ::iutest::detail::FormatFileLocation(NULL, 1) );
IUTEST_EXPECT_STREQ("main.cpp"
, ::iutest::detail::FormatFileLocation("main.cpp", -1) );

::iutest::IUTEST_FLAG(file_location_style_msvc) = true;
IUTEST_EXPECT_STREQ("main.cpp(1)"
, ::iutest::detail::FormatFileLocation("main.cpp", 1) );
IUTEST_EXPECT_STREQ("unknown file(1)"
, ::iutest::detail::FormatFileLocation(NULL, 1) );
IUTEST_EXPECT_STREQ("main.cpp"
, ::iutest::detail::FormatFileLocation("main.cpp", -1) );
}


#ifdef UNICODE
int wmain(int argc, wchar_t* argv[])
Expand Down

0 comments on commit aab1cbc

Please sign in to comment.