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
5//
6//===----------------------------------------------------------------------===//
7
8// UNSUPPORTED: c++03
9// UNSUPPORTED: no-localization
10
11// "support/make_string.h"
12
13#include "make_string.h"
14#include <cassert>
15
16#include "test_macros.h"
17
18int main(int, char**) {
19 // clang-format off
20 assert(MAKE_STRING(char,
21 " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
22 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
23 == " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
24 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
25
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{|}~");
32#endif
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{|}~");
39#endif
40 assert(MAKE_STRING(char16_t,
41 " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
42 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
43 == u" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
44 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
45
46 assert(MAKE_STRING(char32_t,
47 " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
48 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
49 == U" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
50 "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
51
52 // clang-format on
53 return 0;
54}
55

source code of libcxx/test/support/test.support/make_string_header.pass.cpp