Skip to content

Commit

Permalink
Unit tests: Fix a few MSVC warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Apr 28, 2017
1 parent f142ed6 commit 74df918
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tests/gui/test_gui2.cpp
Expand Up @@ -339,13 +339,13 @@ void test()
{
gui2::new_widgets = false;

for(size_t i = 0; i < 2; ++i) {
// for(size_t i = 0; i < 2; ++i) {

test_resolutions<T>(get_gui_resolutions());

break; // FIXME: New widgets break
gui2::new_widgets = true;
}
// break; // FIXME: New widgets break
// gui2::new_widgets = true;
// }
}

template<class T>
Expand Down
11 changes: 11 additions & 0 deletions src/tests/test_serialization.cpp
Expand Up @@ -65,9 +65,20 @@ BOOST_AUTO_TEST_CASE( utils_unicode_test )
utf16::string water_u16 = unicode_cast<utf16::string>(water_u4);

BOOST_CHECK_EQUAL(water_u4[0], water_u16[0]);
#if defined(_WIN32) || defined(_WIN64)
// Windows complains it can't be represented in the currentl code-page.
// So instead, check directly for its UTF-8 representation.
BOOST_CHECK_EQUAL(water_u8, "\xE6\xB0\xB4");
#else
BOOST_CHECK_EQUAL(water_u8, "\u6C34");
#endif

#if defined(_WIN32) || defined(_WIN64)
// Same as above.
utf8::string nonbmp_u8("\xF0\x90\x80\x80");
#else
utf8::string nonbmp_u8("\U00010000");
#endif
ucs4::string nonbmp_u4 = unicode_cast<ucs4::string>(nonbmp_u8);
utf16::string nonbmp_u16 = unicode_cast<utf16::string>(nonbmp_u4);

Expand Down

0 comments on commit 74df918

Please sign in to comment.