diff options
author | Seth Cantrell <seth.cantrell@gmail.com> | 2012-01-21 00:16:11 +0000 |
---|---|---|
committer | Seth Cantrell <seth.cantrell@gmail.com> | 2012-01-21 00:16:11 +0000 |
commit | e424844985873dc7cd7b6c8e47d670c0ce34cfdf (patch) | |
tree | cc980dcd2ab177dc42bae8d4ba8e623f73260f81 | |
parent | e03b2b3ca9032b18fd1c3d0fca7692e4d2551277 (diff) |
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
-rw-r--r-- | test/CodeGen/char-literal.c | 20 |
1 files changed, 17 insertions, 3 deletions
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 |