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