From 785acdb1c67074dbbc3ffdd4c3a0b42d7f64d80e Mon Sep 17 00:00:00 2001 From: leper Date: Mon, 11 Jan 2016 20:03:01 +0000 Subject: [PATCH] Fix test failure on Windows. This was SVN commit r17629. --- source/scriptinterface/tests/test_ScriptConversions.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/scriptinterface/tests/test_ScriptConversions.h b/source/scriptinterface/tests/test_ScriptConversions.h index f91778b7f3..1faa35659f 100644 --- a/source/scriptinterface/tests/test_ScriptConversions.h +++ b/source/scriptinterface/tests/test_ScriptConversions.h @@ -159,9 +159,10 @@ public: roundtrip(L"", "\"\""); roundtrip(L"test", "\"test\""); - roundtrip(L"тест", "\"\\u0442\\u0435\\u0441\\u0442\""); + // Windows has two byte wchar_t. We test for this explicitly since we can catch more possible issues this way. + roundtrip(L"тест", sizeof(wchar_t) == 2 ? "\"\\xD1\\u201A\\xD0\\xB5\\xD1\\x81\\xD1\\u201A\"" : "\"\\u0442\\u0435\\u0441\\u0442\""); roundtrip(w1, "\"t\\x00st\""); - roundtrip(w2, "\"\\u0442\\x00\\u0441\\u0442\""); + roundtrip(w2, sizeof(wchar_t) == 2 ? "\"\\xD1\\x00\\xD0\\xB5\\xD1\\x81\\xD1\\u201A\"" : "\"\\u0442\\x00\\u0441\\u0442\""); convert_to("", "\"\""); convert_to("test", "\"test\"");