Files
c3c/test/test_suite/builtins/wide_strings.c3t
Zack Puhl 177df6321a add test file for wide string constants
add full UTF-8 to wide-str language capabilities
move wstr language constant expressions to builtins and adjust test cases
2025-03-04 13:46:59 +01:00

26 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// #target: macos-x64
ushort[?] a = $$wstr16("WIDESTR");
ushort[?] b = $$wstr16("Esc\r\n");
ushort[?] c = $$wstr16(`lit
str\ting`);
ushort[?] d = $$wstr16(`γειά`);
uint[?] e = $$wstr32("\u03B3ειά");
ushort[?] f = $$wstr16("");
uint[?] g = $$wstr32("");
ushort[?] h = $$wstr16(``);
uint[?] i = $$wstr32(``);
uint[?] j = $$wstr32("-");
/* #expect: wide_strings.ll
@wide_strings.a = local_unnamed_addr global [8 x i16] [i16 87, i16 73, i16 68, i16 69, i16 83, i16 84, i16 82, i16 0], align 16
@wide_strings.b = local_unnamed_addr global [6 x i16] [i16 69, i16 115, i16 99, i16 13, i16 10, i16 0], align 2
@wide_strings.c = local_unnamed_addr global [13 x i16] [i16 108, i16 105, i16 116, i16 10, i16 115, i16 116, i16 114, i16 92, i16 116, i16 105, i16 110, i16 103, i16 0], align 16
@wide_strings.d = local_unnamed_addr global [5 x i16] [i16 947, i16 949, i16 953, i16 940, i16 0], align 2
@wide_strings.e = local_unnamed_addr global [5 x i32] [i32 947, i32 949, i32 953, i32 940, i32 0], align 16
@wide_strings.f = local_unnamed_addr global [1 x i16] zeroinitializer, align 2
@wide_strings.g = local_unnamed_addr global [1 x i32] zeroinitializer, align 4
@wide_strings.h = local_unnamed_addr global [1 x i16] zeroinitializer, align 2
@wide_strings.i = local_unnamed_addr global [1 x i32] zeroinitializer, align 4
@wide_strings.j = local_unnamed_addr global [2 x i32] [i32 45, i32 0], align 4