[cfe-commits] r148603 - /cfe/trunk/test/CodeGen/char-literal.c
Seth Cantrell
seth.cantrell at gmail.com
Fri Jan 20 16:16:11 PST 2012
Author: socantre
Date: Fri Jan 20 18:16:11 2012
New Revision: 148603
URL: http://llvm.org/viewvc/llvm-project?rev=148603&view=rev
Log:
add tests for wide character encodings
and fix typo
Modified:
cfe/trunk/test/CodeGen/char-literal.c
Modified: cfe/trunk/test/CodeGen/char-literal.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/char-literal.c?rev=148603&r1=148602&r2=148603&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/char-literal.c (original)
+++ cfe/trunk/test/CodeGen/char-literal.c Fri Jan 20 18:16:11 2012
@@ -14,17 +14,17 @@
// 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 @@
// 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
More information about the cfe-commits
mailing list