diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-05-30 12:09:05 -0400 |
---|---|---|
committer | Christian Stenger <christian.stenger@digia.com> | 2014-06-05 08:14:57 +0200 |
commit | 655470cc0c89f9b4c781b91b460ac71f3d8d1a3b (patch) | |
tree | 0a4ec7cdf2d5336845f23b55710d8da6cdb20156 /src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | |
parent | 2e5ce2a8dcb0ea055f37e1cfac233e7404aa0ee3 (diff) |
C++: Tests: Fix unicode tests with MSVC
Change-Id: I5575826558bf60982ecc964e4dd85a3f4e920197
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp')
-rw-r--r-- | src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index 3477e36f52..0f1c202846 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -44,6 +44,19 @@ #include <QDir> #include <QtTest> +// +// The following "non-latin1" code points are used in the tests: +// +// U+00FC - 2 code units in UTF8, 1 in UTF16 - LATIN SMALL LETTER U WITH DIAERESIS +// U+4E8C - 3 code units in UTF8, 1 in UTF16 - CJK UNIFIED IDEOGRAPH-4E8C +// U+10302 - 4 code units in UTF8, 2 in UTF16 - OLD ITALIC LETTER KE +// + +#define UNICODE_U00FC "\xc3\xbc" +#define UNICODE_U4E8C "\xe4\xba\x8c" +#define UNICODE_U10302 "\xf0\x90\x8c\x82" +#define TEST_UNICODE_IDENTIFIER UNICODE_U00FC UNICODE_U4E8C UNICODE_U10302 + /*! Tests for Follow Symbol Under Cursor and Switch Between Function Declaration/Definition @@ -501,8 +514,8 @@ void CppEditorPlugin::test_SwitchMethodDeclarationDefinition_data() ) << _(); QTest::newRow("unicodeIdentifier") << _( - "class Foo { void $\u00FC\u4E8C\U00010302(); };\n" - "void Foo::@\u00FC\u4E8C\U00010302() {}\n" + "class Foo { void $" TEST_UNICODE_IDENTIFIER "(); };\n" + "void Foo::@" TEST_UNICODE_IDENTIFIER "() {}\n" ) << _(); } @@ -921,8 +934,8 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_data() ); QTest::newRow("unicodeIdentifier") << _( - "class Foo { void $\u00FC\u4E8C\U00010302(); };\n" - "void Foo::@\u00FC\u4E8C\U00010302() {}\n" + "class Foo { void $" TEST_UNICODE_IDENTIFIER "(); };\n" + "void Foo::@" TEST_UNICODE_IDENTIFIER "() {}\n" ); } |