/external/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/ |
D | find.pass.cpp | 25 constexpr const char16_t *p = u"123"; in test_constexpr() 26 return std::char_traits<char16_t>::find(p, 3, u'1') == p in test_constexpr() 27 && std::char_traits<char16_t>::find(p, 3, u'2') == p + 1 in test_constexpr() 28 && std::char_traits<char16_t>::find(p, 3, u'3') == p + 2 in test_constexpr() 29 && std::char_traits<char16_t>::find(p, 3, u'4') == nullptr; in test_constexpr() 36 char16_t s1[] = {1, 2, 3}; in main() 37 assert(std::char_traits<char16_t>::find(s1, 3, char16_t(1)) == s1); in main() 38 assert(std::char_traits<char16_t>::find(s1, 3, char16_t(2)) == s1+1); in main() 39 assert(std::char_traits<char16_t>::find(s1, 3, char16_t(3)) == s1+2); in main() 40 assert(std::char_traits<char16_t>::find(s1, 3, char16_t(4)) == 0); in main() [all …]
|
D | compare.pass.cpp | 25 return std::char_traits<char16_t>::compare(u"123", u"223", 3) < 0 in test_constexpr() 26 && std::char_traits<char16_t>::compare(u"223", u"123", 3) > 0 in test_constexpr() 27 && std::char_traits<char16_t>::compare(u"123", u"123", 3) == 0; in test_constexpr() 36 assert(std::char_traits<char16_t>::compare(u"", u"", 0) == 0); in main() 37 assert(std::char_traits<char16_t>::compare(NULL, NULL, 0) == 0); in main() 39 assert(std::char_traits<char16_t>::compare(u"1", u"1", 1) == 0); in main() 40 assert(std::char_traits<char16_t>::compare(u"1", u"2", 1) < 0); in main() 41 assert(std::char_traits<char16_t>::compare(u"2", u"1", 1) > 0); in main() 43 assert(std::char_traits<char16_t>::compare(u"12", u"12", 2) == 0); in main() 44 assert(std::char_traits<char16_t>::compare(u"12", u"13", 2) < 0); in main() [all …]
|
D | move.pass.cpp | 22 char16_t s1[] = {1, 2, 3}; in main() 23 assert(std::char_traits<char16_t>::move(s1, s1+1, 2) == s1); in main() 24 assert(s1[0] == char16_t(2)); in main() 25 assert(s1[1] == char16_t(3)); in main() 26 assert(s1[2] == char16_t(3)); in main() 27 s1[2] = char16_t(0); in main() 28 assert(std::char_traits<char16_t>::move(s1+1, s1, 2) == s1+1); in main() 29 assert(s1[0] == char16_t(2)); in main() 30 assert(s1[1] == char16_t(2)); in main() 31 assert(s1[2] == char16_t(3)); in main() [all …]
|
D | assign3.pass.cpp | 22 char16_t s2[3] = {0}; in main() 23 assert(std::char_traits<char16_t>::assign(s2, 3, char16_t(5)) == s2); in main() 24 assert(s2[0] == char16_t(5)); in main() 25 assert(s2[1] == char16_t(5)); in main() 26 assert(s2[2] == char16_t(5)); in main() 27 assert(std::char_traits<char16_t>::assign(NULL, 0, char16_t(5)) == NULL); in main()
|
D | copy.pass.cpp | 22 char16_t s1[] = {1, 2, 3}; in main() 23 char16_t s2[3] = {0}; in main() 24 assert(std::char_traits<char16_t>::copy(s2, s1, 3) == s2); in main() 25 assert(s2[0] == char16_t(1)); in main() 26 assert(s2[1] == char16_t(2)); in main() 27 assert(s2[2] == char16_t(3)); in main() 28 assert(std::char_traits<char16_t>::copy(NULL, s1, 0) == NULL); in main() 29 assert(std::char_traits<char16_t>::copy(s1, NULL, 0) == s1); in main()
|
D | eq_int_type.pass.cpp | 25 assert( std::char_traits<char16_t>::eq_int_type(u'a', u'a')); in main() 26 assert(!std::char_traits<char16_t>::eq_int_type(u'a', u'A')); in main() 27 assert(!std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(), u'A')); in main() 29 assert( std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(), in main() 30 std::char_traits<char16_t>::eof())); in main()
|
D | length.pass.cpp | 25 return std::char_traits<char16_t>::length(u"") == 0 in test_constexpr() 26 && std::char_traits<char16_t>::length(u"abcd") == 4; in test_constexpr() 34 assert(std::char_traits<char16_t>::length(u"") == 0); in main() 35 assert(std::char_traits<char16_t>::length(u"a") == 1); in main() 36 assert(std::char_traits<char16_t>::length(u"aa") == 2); in main() 37 assert(std::char_traits<char16_t>::length(u"aaa") == 3); in main() 38 assert(std::char_traits<char16_t>::length(u"aaaa") == 4); in main()
|
D | not_eof.pass.cpp | 25 assert(std::char_traits<char16_t>::not_eof(u'a') == u'a'); in main() 26 assert(std::char_traits<char16_t>::not_eof(u'A') == u'A'); in main() 28 assert(std::char_traits<char16_t>::not_eof(0) == 0); in main() 29 assert(std::char_traits<char16_t>::not_eof(std::char_traits<char16_t>::eof()) != in main() 30 std::char_traits<char16_t>::eof()); in main()
|
D | types.pass.cpp | 27 static_assert((std::is_same<std::char_traits<char16_t>::char_type, char16_t>::value), ""); in main() 28 …static_assert((std::is_same<std::char_traits<char16_t>::int_type, std::uint_least16_t>::value), ""… in main() 29 static_assert((std::is_same<std::char_traits<char16_t>::off_type, std::streamoff>::value), ""); in main() 30 … static_assert((std::is_same<std::char_traits<char16_t>::pos_type, std::u16streampos>::value), ""); in main() 31 … static_assert((std::is_same<std::char_traits<char16_t>::state_type, std::mbstate_t>::value), ""); in main()
|
D | assign2.pass.cpp | 25 char16_t c = u'1'; in test_constexpr() 26 std::char_traits<char16_t>::assign(c, u'a'); in test_constexpr() 35 char16_t c = u'\0'; in main() 36 std::char_traits<char16_t>::assign(c, u'a'); in main()
|
/external/icu/icu4c/source/common/unicode/ |
D | char16ptr.h | 46 inline Char16Ptr(char16_t *p); 81 inline char16_t *get() const; 87 inline operator char16_t *() const { return get(); } 93 template<typename T> static char16_t *cast(T *t) { in cast() 95 return reinterpret_cast<char16_t *>(t); in cast() 98 char16_t *p_; 101 char16_t *cp; 110 Char16Ptr::Char16Ptr(char16_t *p) : p_(p) {} in Char16Ptr() 122 char16_t *Char16Ptr::get() const { return p_; } in get() 126 Char16Ptr::Char16Ptr(char16_t *p) { u_.cp = p; } in Char16Ptr() [all …]
|
D | ucharstrie.h | 112 const char16_t *uchars; 113 const char16_t *pos; 223 const char16_t *pos=pos_; in getValue() 240 const char16_t *pos=pos_; in hasUniqueValue() 339 const char16_t *branchNext(const char16_t *pos, int32_t length, UErrorCode &errorCode); 341 const char16_t *uchars_; 342 const char16_t *pos_; 343 const char16_t *initialPos_; 371 UCharsTrie(char16_t *adoptUChars, const char16_t *trieUChars) in UCharsTrie() 384 static inline int32_t readValue(const char16_t *pos, int32_t leadUnit) { in readValue() [all …]
|
D | unistr.h | 70 char16_t *dest, int32_t destCapacity, 71 const char16_t *src, int32_t srcLength, 115 # define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, (const char16_t*)u ## cs, _length) 452 const char16_t *srcChars) const; 473 const char16_t *srcChars, 611 const char16_t *srcChars) const; 636 const char16_t *srcChars, 786 const char16_t *srcChars, 813 const char16_t *srcChars, 890 inline UBool startsWith(const char16_t *srcChars, [all …]
|
D | appendable.h | 65 virtual UBool appendCodeUnit(char16_t c) = 0; 84 virtual UBool appendString(const char16_t *s, int32_t length); 141 virtual char16_t *getAppendBuffer(int32_t minCapacity, 143 char16_t *scratch, int32_t scratchCapacity, 174 virtual UBool appendCodeUnit(char16_t c); 191 virtual UBool appendString(const char16_t *s, int32_t length); 223 virtual char16_t *getAppendBuffer(int32_t minCapacity, 225 char16_t *scratch, int32_t scratchCapacity,
|
D | uchriter.h | 144 virtual char16_t first(void); 154 virtual char16_t firstPostInc(void); 184 virtual char16_t last(void); 203 virtual char16_t setIndex(int32_t position); 223 virtual char16_t current(void) const; 239 virtual char16_t next(void); 249 virtual char16_t nextPostInc(void); 291 virtual char16_t previous(void); 382 const char16_t* text;
|
D | chariter.h | 152 virtual char16_t nextPostInc(void) = 0; 389 virtual char16_t first(void) = 0; 399 virtual char16_t firstPostInc(void); 438 virtual char16_t last(void) = 0; 466 virtual char16_t setIndex(int32_t position) = 0; 486 virtual char16_t current(void) const = 0; 502 virtual char16_t next(void) = 0; 523 virtual char16_t previous(void) = 0;
|
D | casemap.h | 66 const char16_t *src, int32_t srcLength, 67 char16_t *dest, int32_t destCapacity, Edits *edits, 102 const char16_t *src, int32_t srcLength, 103 char16_t *dest, int32_t destCapacity, Edits *edits, 153 const char16_t *src, int32_t srcLength, 154 char16_t *dest, int32_t destCapacity, Edits *edits, 195 const char16_t *src, int32_t srcLength, 196 char16_t *dest, int32_t destCapacity, Edits *edits,
|
/external/clang/test/Parser/ |
D | char-literal-printing.c | 36 char16_t test26(void) { return u'\\'; } in test26() 37 char16_t test27(void) { return u'\''; } in test27() 38 char16_t test28(void) { return u'\a'; } in test28() 39 char16_t test29(void) { return u'\b'; } in test29() 40 char16_t test30(void) { return u'\e'; } in test30() 41 char16_t test31(void) { return u'\f'; } in test31() 42 char16_t test32(void) { return u'\n'; } in test32() 43 char16_t test33(void) { return u'\r'; } in test33() 44 char16_t test34(void) { return u'\t'; } in test34() 45 char16_t test35(void) { return u'\v'; } in test35() [all …]
|
/external/clang/test/Sema/ |
D | string-init.c | 5 typedef unsigned short char16_t; typedef 21 …char16_t c1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}} in f() 22 …char16_t c2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string litera… in f() 23 char16_t c3[] = u"a"; // No error. in f() 24 …char16_t c4[] = U"a"; // expected-error{{initializing wide char array with incompatible wide strin… in f() 25 …char16_t c5[] = L"a"; // expected-error{{initializing wide char array with incompatible wide strin… in f() 49 …char16_t c[] = 1; // expected-error{{array initializer must be an initializer list or wide string … in g()
|
/external/clang/test/Lexer/ |
D | string_concat.cpp | 6 typedef __CHAR16_TYPE__ char16_t; 21 …const char16_t* g = u"abc" u8"abc"; // expected-error {{unsupported non-standard concatenation of … in f() 22 …const char16_t* h = u"abc" U"abc"; // expected-error {{unsupported non-standard concatenation of s… in f() 23 …const char16_t* i = u"abc" L"abc"; // expected-error {{unsupported non-standard concatenation of s… in f() 25 …const char16_t* j = u"abc" u8R"(abc)"; // expected-error {{unsupported non-standard concatenation … in f() 26 …const char16_t* k = u"abc" UR"(abc)"; // expected-error {{unsupported non-standard concatenation o… in f() 27 …const char16_t* l = u"abc" LR"(abc)"; // expected-error {{unsupported non-standard concatenation o… in f()
|
D | char-literal.cpp | 6 typedef __CHAR16_TYPE__ char16_t; 21 char16_t g = u'ab'; // expected-error {{Unicode character literals may not contain multiple charact… 22 char16_t h = u'\U0010FFFD'; // expected-error {{character too large for enclosing character literal… 33 char16_t o = ''; // expected-error {{character too large for enclosing character literal type}} 35 char16_t p[2] = u"\U0000FFFF"; 36 char16_t q[2] = u"\U00010000";
|
/external/clang/test/SemaCXX/ |
D | string-init.cpp | 16 …char16_t c1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}} in f() 17 …char16_t c2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string litera… in f() 18 char16_t c3[] = u"a"; // No error. in f() 19 …char16_t c4[] = U"a"; // expected-error{{initializing wide char array with incompatible wide strin… in f() 20 …char16_t c5[] = L"a"; // expected-error{{initializing wide char array with incompatible wide strin… in f() 38 …char16_t c[] = 1; // expected-error{{array initializer must be an initializer list or wide string … in g()
|
/external/clang/test/CodeGen/ |
D | string-literal.c | 10 typedef __CHAR16_TYPE__ char16_t; typedef 56 const char16_t *e = u"EF"; in main() 61 const char16_t *f = u"\u1120\u0220\U00102030"; in main() 66 const char16_t *p = u"\u1120\u0320" "\U00102030"; in main() 80 const char16_t *j = uR"foo(GH)foo"; in main() 112 const char16_t *t = uR\ in main()
|
D | char-literal.c | 43 char16_t ua = u'a'; in main() 49 char16_t ua1 = u'З'; in main() 51 char16_t ua2 = u'ヺ'; in main() 53 char16_t ua3 = u'闗'; in main() 71 char16_t uc = u'\uF00B'; in main()
|
/external/icu/icu4c/source/i18n/unicode/ |
D | tblcoll.h | 311 virtual UCollationResult compare(const char16_t* source, int32_t sourceLength, 312 const char16_t* target, int32_t targetLength, 380 virtual CollationKey& getCollationKey(const char16_t *source, 564 virtual uint32_t setVariableTop(const char16_t *varTop, int32_t len, UErrorCode &status); 649 virtual int32_t getSortKey(const char16_t *source, int32_t sourceLength, 824 UCollationResult doCompare(const char16_t *left, int32_t leftLength, 825 const char16_t *right, int32_t rightLength, 831 void writeSortKey(const char16_t *s, int32_t length, 834 void writeIdenticalLevel(const char16_t *s, const char16_t *limit,
|