artyom-beilis / cppcms

CppCMS Framework
Other
443 stars 107 forks source link

Some tests failed #53

Closed jin-qin closed 5 years ago

jin-qin commented 5 years ago

Some tests failed

System: Windows 7 x64 System charset: GB2312 Platform: MSYS2 MinGW x64 Compiler: g++ 8.2.1 Dependencies: cmake-3.12.4, zlib-1.2.11, pcre-8.42, python-2.7.15 Region: China


The following tests FAILED: 93 - test_locale_boundary (Failed) 94 - test_locale_formatting (Failed) Errors while running CTest mingw32-make: *** [Makefile:106: test] Error 8


_# ./test_locale_formatting_ Testing char, UTF-8 Error in line:296 (ss.str())==(to_correct_string("USD1,345.00",loc)) Error in line:297 (ss.str())==(to_correct_string("USD1,345.34",loc)) Error in line:480 (ss.str())==(to_correct_string("USD1,234.00",loc)) Error in line:480 (ss.str())==(to_correct_string("USD1,234.00",loc)) Error in line:480 ((booster::locale::basic_format(fmt) % 1234).str(loc))==(to_correct_string("USD1,234.00",loc)) Testing char, ISO8859-1 Error in line:296 (ss.str())==(to_correct_string("USD1,345.00",loc)) Error in line:297 (ss.str())==(to_correct_string("USD1,345.34",loc)) Error in line:480 (ss.str())==(to_correct_string("USD1,234.00",loc)) Error in line:480 (ss.str())==(to_correct_string("USD1,234.00",loc)) Error in line:480 ((booster::locale::basic_format(fmt) % 1234).str(loc))==(to_correct_string("USD1,234.00",loc)) Testing wchar_t Error in line:296 (ss.str())==(to_correct_string("USD1,345.00",loc)) Error in line:297 (ss.str())==(to_correct_string("USD1,345.34",loc)) Error in line:480 (ss.str())==(to_correct_string("USD1,234.00",loc)) Error in line:480 (ss.str())==(to_correct_string("USD1,234.00",loc)) Error in line:480 ((booster::locale::basic_format(fmt) % 1234).str(loc))==(to_correct_string("USD1,234.00",loc))

Passed 1218 tests Failed 15 tests 98.8% of tests completed sucsessefully

jin-qin commented 5 years ago

Well, I think this error was caused by the following code: std::locale loc=g("en_US."+e_charset); Because my location is in China, and windows will use GB2312 as default charset, this may not affect normal functions.