1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: no-localization
12 // "support/make_string.h"
14 #include "make_string.h"
17 #include "test_macros.h"
19 int main(int, char**) {
21 assert(MAKE_STRING(char,
22 " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
23 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
24 == " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
25 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
27 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
28 assert(MAKE_STRING(wchar_t,
29 " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
30 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
31 == L
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
32 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
34 #if _LIBCPP_HAS_CHAR8_T
35 assert(MAKE_STRING(char8_t
,
36 " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
37 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
38 == u8
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
39 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
41 assert(MAKE_STRING(char16_t
,
42 " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
43 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
44 == u
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
45 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
47 assert(MAKE_STRING(char32_t
,
48 " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
49 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
50 == U
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
51 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");