/external/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/ |
D | find.pass.cpp | 25 constexpr const char32_t *p = U"123"; in test_constexpr() 26 return std::char_traits<char32_t>::find(p, 3, U'1') == p in test_constexpr() 27 && std::char_traits<char32_t>::find(p, 3, U'2') == p + 1 in test_constexpr() 28 && std::char_traits<char32_t>::find(p, 3, U'3') == p + 2 in test_constexpr() 29 && std::char_traits<char32_t>::find(p, 3, U'4') == nullptr; in test_constexpr() 36 char32_t s1[] = {1, 2, 3}; in main() 37 assert(std::char_traits<char32_t>::find(s1, 3, char32_t(1)) == s1); in main() 38 assert(std::char_traits<char32_t>::find(s1, 3, char32_t(2)) == s1+1); in main() 39 assert(std::char_traits<char32_t>::find(s1, 3, char32_t(3)) == s1+2); in main() 40 assert(std::char_traits<char32_t>::find(s1, 3, char32_t(4)) == 0); in main() [all …]
|
D | compare.pass.cpp | 25 return std::char_traits<char32_t>::compare(U"123", U"223", 3) < 0 in test_constexpr() 26 && std::char_traits<char32_t>::compare(U"223", U"123", 3) > 0 in test_constexpr() 27 && std::char_traits<char32_t>::compare(U"123", U"123", 3) == 0; in test_constexpr() 35 assert(std::char_traits<char32_t>::compare(U"", U"", 0) == 0); in main() 36 assert(std::char_traits<char32_t>::compare(NULL, NULL, 0) == 0); in main() 38 assert(std::char_traits<char32_t>::compare(U"1", U"1", 1) == 0); in main() 39 assert(std::char_traits<char32_t>::compare(U"1", U"2", 1) < 0); in main() 40 assert(std::char_traits<char32_t>::compare(U"2", U"1", 1) > 0); in main() 42 assert(std::char_traits<char32_t>::compare(U"12", U"12", 2) == 0); in main() 43 assert(std::char_traits<char32_t>::compare(U"12", U"13", 2) < 0); in main() [all …]
|
D | move.pass.cpp | 22 char32_t s1[] = {1, 2, 3}; in main() 23 assert(std::char_traits<char32_t>::move(s1, s1+1, 2) == s1); in main() 24 assert(s1[0] == char32_t(2)); in main() 25 assert(s1[1] == char32_t(3)); in main() 26 assert(s1[2] == char32_t(3)); in main() 27 s1[2] = char32_t(0); in main() 28 assert(std::char_traits<char32_t>::move(s1+1, s1, 2) == s1+1); in main() 29 assert(s1[0] == char32_t(2)); in main() 30 assert(s1[1] == char32_t(2)); in main() 31 assert(s1[2] == char32_t(3)); in main() [all …]
|
D | assign3.pass.cpp | 22 char32_t s2[3] = {0}; in main() 23 assert(std::char_traits<char32_t>::assign(s2, 3, char32_t(5)) == s2); in main() 24 assert(s2[0] == char32_t(5)); in main() 25 assert(s2[1] == char32_t(5)); in main() 26 assert(s2[2] == char32_t(5)); in main() 27 assert(std::char_traits<char32_t>::assign(NULL, 0, char32_t(5)) == NULL); in main()
|
D | copy.pass.cpp | 22 char32_t s1[] = {1, 2, 3}; in main() 23 char32_t s2[3] = {0}; in main() 24 assert(std::char_traits<char32_t>::copy(s2, s1, 3) == s2); in main() 25 assert(s2[0] == char32_t(1)); in main() 26 assert(s2[1] == char32_t(2)); in main() 27 assert(s2[2] == char32_t(3)); in main() 28 assert(std::char_traits<char32_t>::copy(NULL, s1, 0) == NULL); in main() 29 assert(std::char_traits<char32_t>::copy(s1, NULL, 0) == s1); in main()
|
D | eq_int_type.pass.cpp | 25 assert( std::char_traits<char32_t>::eq_int_type(U'a', U'a')); in main() 26 assert(!std::char_traits<char32_t>::eq_int_type(U'a', U'A')); in main() 27 assert(!std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(), U'A')); in main() 29 assert( std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(), in main() 30 std::char_traits<char32_t>::eof())); in main()
|
D | length.pass.cpp | 25 return std::char_traits<char32_t>::length(U"") == 0 in test_constexpr() 26 && std::char_traits<char32_t>::length(U"abcd") == 4; in test_constexpr() 34 assert(std::char_traits<char32_t>::length(U"") == 0); in main() 35 assert(std::char_traits<char32_t>::length(U"a") == 1); in main() 36 assert(std::char_traits<char32_t>::length(U"aa") == 2); in main() 37 assert(std::char_traits<char32_t>::length(U"aaa") == 3); in main() 38 assert(std::char_traits<char32_t>::length(U"aaaa") == 4); in main()
|
D | not_eof.pass.cpp | 25 assert(std::char_traits<char32_t>::not_eof(U'a') == U'a'); in main() 26 assert(std::char_traits<char32_t>::not_eof(U'A') == U'A'); in main() 28 assert(std::char_traits<char32_t>::not_eof(0) == 0); in main() 29 assert(std::char_traits<char32_t>::not_eof(std::char_traits<char32_t>::eof()) != in main() 30 std::char_traits<char32_t>::eof()); in main()
|
D | types.pass.cpp | 27 static_assert((std::is_same<std::char_traits<char32_t>::char_type, char32_t>::value), ""); in main() 28 …static_assert((std::is_same<std::char_traits<char32_t>::int_type, std::uint_least32_t>::value), ""… in main() 29 static_assert((std::is_same<std::char_traits<char32_t>::off_type, std::streamoff>::value), ""); in main() 30 … static_assert((std::is_same<std::char_traits<char32_t>::pos_type, std::u32streampos>::value), ""); in main() 31 … static_assert((std::is_same<std::char_traits<char32_t>::state_type, std::mbstate_t>::value), ""); in main()
|
D | assign2.pass.cpp | 25 char32_t c = U'1'; in test_constexpr() 26 std::char_traits<char32_t>::assign(c, U'a'); in test_constexpr() 35 char32_t c = U'\0'; in main() 36 std::char_traits<char32_t>::assign(c, U'a'); in main()
|
D | to_char_type.pass.cpp | 25 assert(std::char_traits<char32_t>::to_char_type(U'a') == U'a'); in main() 26 assert(std::char_traits<char32_t>::to_char_type(U'A') == U'A'); in main() 28 assert(std::char_traits<char32_t>::to_char_type(0) == 0); in main()
|
D | to_int_type.pass.cpp | 25 assert(std::char_traits<char32_t>::to_int_type(U'a') == U'a'); in main() 26 assert(std::char_traits<char32_t>::to_int_type(U'A') == U'A'); in main() 28 assert(std::char_traits<char32_t>::to_int_type(0) == 0); in main()
|
/external/clang/test/Parser/ |
D | char-literal-printing.c | 52 char32_t test39(void) { return U'\\'; } in test39() 53 char32_t test40(void) { return U'\''; } in test40() 54 char32_t test41(void) { return U'\a'; } in test41() 55 char32_t test42(void) { return U'\b'; } in test42() 56 char32_t test43(void) { return U'\e'; } in test43() 57 char32_t test44(void) { return U'\f'; } in test44() 58 char32_t test45(void) { return U'\n'; } in test45() 59 char32_t test46(void) { return U'\r'; } in test46() 60 char32_t test47(void) { return U'\t'; } in test47() 61 char32_t test48(void) { return U'\v'; } in test48() [all …]
|
/external/clang/test/Sema/ |
D | string-init.c | 6 typedef unsigned int char32_t; typedef 27 …char32_t d1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}} in f() 28 …char32_t d2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string litera… in f() 29 …char32_t d3[] = u"a"; // expected-error{{initializing wide char array with incompatible wide strin… in f() 30 char32_t d4[] = U"a"; // No error. in f() 31 …char32_t d5[] = L"a"; // expected-error{{initializing wide char array with incompatible wide strin… in f() 50 …char32_t d[] = 1; // expected-error{{array initializer must be an initializer list or wide string … in g()
|
/external/clang/test/Lexer/ |
D | string_concat.cpp | 7 typedef __CHAR32_TYPE__ char32_t; 30 …const char32_t* m = U"abc" u8"abc"; // expected-error {{unsupported non-standard concatenation of … in f() 31 …const char32_t* n = U"abc" u"abc"; // expected-error {{unsupported non-standard concatenation of s… in f() 32 …const char32_t* o = U"abc" L"abc"; // expected-error {{unsupported non-standard concatenation of s… in f() 34 …const char32_t* p = U"abc" u8R"(abc)"; // expected-error {{unsupported non-standard concatenation … in f() 35 …const char32_t* q = U"abc" uR"(abc)"; // expected-error {{unsupported non-standard concatenation o… in f() 36 …const char32_t* r = U"abc" LR"(abc)"; // expected-error {{unsupported non-standard concatenation o… in f()
|
D | string-literal-encoding.c | 11 char32_t const *c = U"�����"; // expected-error {{illegal character encoding in string literal}} in f() 14 …char32_t const *f = UR"(�����)"; // expected-error {{illegal character encoding in string literal}} in f() 25 …char32_t const *c = U"foo �����"; // expected-error {{illegal character encoding in string literal… in g() 28 …char32_t const *f = UR"(foo �����)"; // expected-error {{illegal character encoding in string lite… in g()
|
D | unicode-strings.c | 8 typedef __CHAR32_TYPE__ char32_t; typedef 18 const char32_t *c = U"abcd"; // expected-warning {{unicode literals are incompatible with}} 21 char32_t e = U'a'; // expected-warning {{unicode literals are incompatible with}}
|
/external/clang/test/CodeGen/ |
D | char-literal.c | 46 char32_t Ua = U'a'; in main() 56 char32_t Ua1 = U'µ'; in main() 58 char32_t Ua2 = U'闗'; in main() 60 char32_t Ua3 = U''; in main() 74 char32_t Uc = U'\uF00B'; in main() 83 char32_t Ud = U'\U0010F00B'; in main()
|
D | string-literal.c | 11 typedef __CHAR32_TYPE__ char32_t; typedef 44 const char32_t *c = U"CD"; in main() 48 const char32_t *d = U"\u1235\U0010F00C"; in main() 52 const char32_t *o = "\u1235" U"\U0010F00B"; in main() 83 const char32_t *k = UR"bar(IJ)bar"; in main() 118 const char32_t *u = UR\ in main()
|
/external/clang/test/SemaCXX/ |
D | string-init.cpp | 22 …char32_t d1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}} in f() 23 …char32_t d2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string litera… in f() 24 …char32_t d3[] = u"a"; // expected-error{{initializing wide char array with incompatible wide strin… in f() 25 char32_t d4[] = U"a"; // No error. in f() 26 …char32_t d5[] = L"a"; // expected-error{{initializing wide char array with incompatible wide strin… in f() 39 …char32_t d[] = 1; // expected-error{{array initializer must be an initializer list or wide string … in g()
|
/external/libcxx/test/std/localization/locale.stdcvt/ |
D | codecvt_utf16_in.pass.cpp | 31 typedef std::codecvt_utf16<char32_t> C; in main() 33 char32_t w = 0; in main() 35 char32_t* wp = nullptr; in main() 70 typedef std::codecvt_utf16<char32_t, 0x1000> C; in main() 72 char32_t w = 0; in main() 74 char32_t* wp = nullptr; in main() 109 typedef std::codecvt_utf16<char32_t, 0x10ffff, std::consume_header> C; in main() 111 char32_t w = 0; in main() 113 char32_t* wp = nullptr; in main() 148 typedef std::codecvt_utf16<char32_t, 0x10ffff, std::little_endian> C; in main() [all …]
|
D | codecvt_utf8_in.pass.cpp | 31 typedef std::codecvt_utf8<char32_t> C; in main() 33 char32_t w = 0; in main() 35 char32_t* wp = nullptr; in main() 70 typedef std::codecvt_utf8<char32_t, 0x1000> C; in main() 72 char32_t w = 0; in main() 74 char32_t* wp = nullptr; in main() 109 typedef std::codecvt_utf8<char32_t, 0xFFFFFFFF, std::consume_header> C; in main() 111 char32_t w = 0; in main() 113 char32_t* wp = nullptr; in main() 151 typedef std::codecvt_utf8<char32_t> C; in main() [all …]
|
/external/clang/test/CXX/lex/lex.charset/ |
D | p2-cxx11.cpp | 30 char32_t w10fffe = U'\U0010fffe'; 31 char32_t w10ffff = U'\U0010ffff'; 32 char32_t w110000 = U'\U00110000'; // expected-error {{invalid universal character}} 38 const char32_t *p5 = U"\u0000\u0012\u004e\u007f\u0080\u009f\u00a0\ud799\ue000"; 42 const char32_t *p9 = U"foo \U0010ffff bar"; // ok
|
/external/libprotobuf-mutator/src/ |
D | utf8_fix.cc | 24 void StoreCode(char* e, char32_t code, uint8_t size, uint8_t prefix) { in StoreCode() 37 char32_t c = *b++; in FixCode() 50 c = std::uniform_int_distribution<char32_t>(0x80, 0x7FF)(*random); in FixCode() 60 c = std::uniform_int_distribution<char32_t>(0x800, in FixCode() 69 c = std::uniform_int_distribution<char32_t>(0x10000, 0x10FFFF)(*random); in FixCode()
|
/external/libcxx/test/std/strings/basic.string/string.cons/ |
D | iter_alloc_deduction.pass.cpp | 84 const char32_t* s = U"12345678901234"; in main() 85 std::basic_string s1{s, s+10, explicit_allocator<char32_t>{}}; in main() 87 static_assert(std::is_same_v<S::value_type, char32_t>, ""); in main() 88 static_assert(std::is_same_v<S::traits_type, std::char_traits<char32_t>>, ""); in main() 89 static_assert(std::is_same_v<S::allocator_type, explicit_allocator<char32_t>>, ""); in main()
|