From 55ec76fd3935981206c978e75151df1aec64d92f Mon Sep 17 00:00:00 2001 From: Bernd Amend Date: Sat, 22 May 2021 23:54:18 +0200 Subject: [PATCH] fix testcase "Test unicode matches C++" --- CMakeLists.txt | 2 +- unittests/compiled_tests.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f54a27ac..b706a15a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,7 +155,7 @@ if(MSVC) add_definitions(/w34062) endif() - add_definitions(/bigobj /permissive-) + add_definitions(/bigobj /permissive- /utf-8) # Note on MSVC compiler flags. # The code base selective disables warnings as necessary when the compiler is complaining too much # about something that is perfectly valid, or there is simply no technical way around it diff --git a/unittests/compiled_tests.cpp b/unittests/compiled_tests.cpp index f4c87509..52cfe959 100644 --- a/unittests/compiled_tests.cpp +++ b/unittests/compiled_tests.cpp @@ -1341,6 +1341,8 @@ TEST_CASE("Test reference member being registered") CHECK(d == Approx(2.3)); } +// starting with C++20 u8"" strings cannot be compared with std::string +// and the support for std::u8strings is still terrible. TEST_CASE("Test unicode matches C++") { chaiscript::ChaiScript_Basic chai(create_chaiscript_stdlib(), create_chaiscript_parser());