From: Seth Cantrell Date: Sat, 21 Jan 2012 00:16:11 +0000 (+0000) Subject: add tests for wide character encodings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e424844985873dc7cd7b6c8e47d670c0ce34cfdf;p=clang add tests for wide character encodings and fix typo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148603 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/char-literal.c b/test/CodeGen/char-literal.c index 5452392ea5..237d4b2010 100644 --- a/test/CodeGen/char-literal.c +++ b/test/CodeGen/char-literal.c @@ -14,17 +14,17 @@ int main() { // CHECK-CPP0X: store i8 98 char b = 'ab'; - // Should get concatonated characters + // Should get concatenated characters // CHECK-C: store i32 24930 // CHECK-CPP0X: store i32 24930 int b1 = 'ab'; - // Should get concatonated characters + // Should get concatenated characters // CHECK-C: store i32 808464432 // CHECK-CPP0X: store i32 808464432 int b2 = '0000'; - // Should get truncated value (last four characters concatonated) + // Should get truncated value (last four characters concatenated) // CHECK-C: store i32 1919512167 // CHECK-CPP0X: store i32 1919512167 int b3 = 'somesillylongstring'; @@ -45,6 +45,20 @@ int main() { // CHECK-CPP0X: store i32 97 char32_t Ua = U'a'; + // CHECK-CPP0X: store i16 1047 + char16_t ua1 = u'З'; + // CHECK-CPP0X: store i16 12538 + char16_t ua2 = u'ヺ'; + // CHECK-CPP0X: store i16 -27177 + char16_t ua3 = u'闗'; + + // CHECK-CPP0X: store i32 181 + char32_t Ua1 = U'µ'; + // CHECK-CPP0X: store i32 38359 + char32_t Ua2 = U'闗'; + // CHECK-CPP0X: store i32 128128 + char32_t Ua3 = U'💀'; + #endif // CHECK-C: store i32 61451