/external/libcxx/test/std/strings/string.view/string.view.capacity/ |
D | capacity.pass.cpp | 28 constexpr SV sv1; in test1() local 29 static_assert ( sv1.size() == 0, "" ); in test1() 30 static_assert ( sv1.empty(), ""); in test1() 31 static_assert ( sv1.size() == sv1.length(), "" ); in test1() 32 static_assert ( sv1.max_size() > sv1.size(), ""); in test1() 37 SV sv1; in test1() local 38 ASSERT_NOEXCEPT(sv1.size()); in test1() 39 ASSERT_NOEXCEPT(sv1.empty()); in test1() 40 ASSERT_NOEXCEPT(sv1.max_size()); in test1() 41 ASSERT_NOEXCEPT(sv1.length()); in test1() [all …]
|
/external/libcxx/test/std/strings/string.view/string.view.ops/ |
D | substr.pass.cpp | 27 std::basic_string_view<CharT> sv1; in test1() local 31 sv1 = sv.substr(pos, n); in test1() 34 sv1 = sv.substr(pos, n); in test1() 43 assert (sv1.size() == rlen); in test1() 45 assert(sv[pos+i] == sv1[i]); in test1() 53 string_view_t sv1 ( s ); in test() local 55 test1(sv1, 0, 0); in test() 56 test1(sv1, 1, 0); in test() 57 test1(sv1, 20, 0); in test() 58 test1(sv1, sv1.size(), 0); in test() [all …]
|
D | copy.pass.cpp | 60 string_view_t sv1 ( s ); in test() local 62 test1(sv1, 0, 0); in test() 63 test1(sv1, 1, 0); in test() 64 test1(sv1, 20, 0); in test() 65 test1(sv1, sv1.size(), 0); in test() 66 test1(sv1, 20, string_view_t::npos); in test() 68 test1(sv1, 0, 3); in test() 69 test1(sv1, 2, 3); in test() 70 test1(sv1, 100, 3); in test() 71 test1(sv1, 100, string_view_t::npos); in test() [all …]
|
D | compare.size_size_sv.pass.cpp | 24 void test1 ( std::basic_string_view<CharT> sv1, size_t pos1, size_t n1, in test1() argument 27 if (pos1 <= sv1.size()) in test1() 28 assert(sign( sv1.compare(pos1, n1, sv2)) == sign(expected)); in test1() 31 assert(sign( sv1.compare(pos1, n1, sv2)) == sign(expected)); in test1() 32 assert(pos1 <= sv1.size()); in test1() 35 assert(pos1 > sv1.size()); in test1() 44 string_view_t sv1 ( s1 ); in test() local 46 test1(sv1, pos1, n1, sv2, expected); in test() 396 constexpr SV sv1 { "abcde", 5 }; in main() local 398 static_assert ( sv1.compare(5, 1, sv2) == 0, "" ); in main() [all …]
|
D | compare.pointer.pass.cpp | 23 void test1 ( std::basic_string_view<CharT> sv1, const CharT *s, int expected ) { in test1() argument 24 assert ( sign( sv1.compare(s)) == sign(expected)); in test1() 32 string_view_t sv1 ( s1 ); in test() local 33 test1 ( sv1, s2, expected ); in test() 119 constexpr SV sv1; in main() local 121 static_assert ( sv1.compare("") == 0, "" ); in main() 122 static_assert ( sv1.compare("abcde") == -1, "" ); in main()
|
D | compare.sv.pass.cpp | 23 void test1 ( std::basic_string_view<CharT> sv1, in test1() argument 25 assert ( sign( sv1.compare(sv2)) == sign(expected)); in test1() 33 string_view_t sv1 ( s1 ); in test() local 35 test1(sv1, sv2, expected); in test() 113 constexpr SV sv1 { "abcde", 5 }; in main() local 116 static_assert ( sv1.compare(sv2) == 0, "" ); in main() 117 static_assert ( sv2.compare(sv1) == 0, "" ); in main()
|
/external/libcxx/test/std/strings/string.view/string.view.template/ |
D | ends_with.string_view.pass.cpp | 27 SV sv1 { s + 4, 1 }; in main() local 37 assert (!sv0.ends_with(sv1)); in main() 39 assert ( sv1.ends_with(sv0)); in main() 40 assert ( sv1.ends_with(sv1)); in main() 41 assert (!sv1.ends_with(sv2)); in main() 42 assert (!sv1.ends_with(sv3)); in main() 43 assert (!sv1.ends_with(sv4)); in main() 44 assert (!sv1.ends_with(sv5)); in main() 45 assert (!sv1.ends_with(svNot)); in main() 48 assert ( sv2.ends_with(sv1)); in main() [all …]
|
D | starts_with.string_view.pass.cpp | 27 SV sv1 { s, 1 }; in main() local 37 assert (!sv0.starts_with(sv1)); in main() 39 assert ( sv1.starts_with(sv0)); in main() 40 assert ( sv1.starts_with(sv1)); in main() 41 assert (!sv1.starts_with(sv2)); in main() 42 assert (!sv1.starts_with(sv3)); in main() 43 assert (!sv1.starts_with(sv4)); in main() 44 assert (!sv1.starts_with(sv5)); in main() 45 assert (!sv1.starts_with(svNot)); in main() 48 assert ( sv2.starts_with(sv1)); in main() [all …]
|
D | ends_with.ptr.pass.cpp | 27 SV sv1 { s + 4, 1 }; in main() local 39 assert ( sv1.ends_with("")); in main() 40 assert ( sv1.ends_with("e")); in main() 41 assert (!sv1.ends_with("de")); in main() 42 assert (!sv1.ends_with("cde")); in main() 43 assert (!sv1.ends_with("bcde")); in main() 44 assert (!sv1.ends_with("abcde")); in main() 45 assert (!sv1.ends_with("def")); in main() 69 constexpr SV sv1 { s + 4, 1 }; in main() local 79 static_assert ( sv1.ends_with(""), "" ); in main() [all …]
|
D | starts_with.ptr.pass.cpp | 27 SV sv1 { s, 1 }; in main() local 39 assert ( sv1.starts_with("")); in main() 40 assert ( sv1.starts_with("a")); in main() 41 assert (!sv1.starts_with("ab")); in main() 42 assert (!sv1.starts_with("abc")); in main() 43 assert (!sv1.starts_with("abcd")); in main() 44 assert (!sv1.starts_with("abcde")); in main() 45 assert (!sv1.starts_with("def")); in main() 69 constexpr SV sv1 { s, 1 }; in main() local 79 static_assert ( sv1.starts_with(""), "" ); in main() [all …]
|
D | ends_with.char.pass.cpp | 25 SV sv1 {}; in main() local 28 ASSERT_NOEXCEPT(sv1.ends_with('e')); in main() 30 assert (!sv1.ends_with('e')); in main() 31 assert (!sv1.ends_with('x')); in main() 39 constexpr SV sv1 {}; in main() local 41 static_assert (!sv1.ends_with('e'), "" ); in main() 42 static_assert (!sv1.ends_with('x'), "" ); in main()
|
D | starts_with.char.pass.cpp | 25 SV sv1 {}; in main() local 28 ASSERT_NOEXCEPT(sv1.starts_with('e')); in main() 30 assert (!sv1.starts_with('a')); in main() 31 assert (!sv1.starts_with('x')); in main() 39 constexpr SV sv1 {}; in main() local 41 static_assert (!sv1.starts_with('a'), "" ); in main() 42 static_assert (!sv1.starts_with('x'), "" ); in main()
|
/external/libcxx/test/std/strings/string.view/string.view.cons/ |
D | from_ptr_len.pass.cpp | 29 SV sv1 ( s, sz ); in test() local 30 assert ( sv1.size() == sz ); in test() 31 assert ( sv1.data() == s ); in test() 43 constexpr std::basic_string_view<char> sv1 ( s, 2 ); in main() local 44 static_assert ( sv1.size() == 2, "" ); in main() 45 static_assert ( sv1.data() == s, "" ); in main() 55 constexpr std::basic_string_view<wchar_t> sv1 ( s, 2 ); in main() local 56 static_assert ( sv1.size() == 2, "" ); in main() 57 static_assert ( sv1.data() == s, "" ); in main() 68 constexpr std::basic_string_view<char16_t> sv1 ( s, 2 ); in main() local [all …]
|
D | default.pass.cpp | 26 constexpr T sv1; in test() local 27 static_assert ( sv1.size() == 0, "" ); in test() 28 static_assert ( sv1.empty(), ""); in test() 33 T sv1; in test() local 34 assert ( sv1.size() == 0 ); in test() 35 assert ( sv1.empty()); in test()
|
D | from_literal.pass.cpp | 37 SV sv1 ( s ); in test() local 38 assert ( sv1.size() == StrLen( s )); in test() 39 assert ( sv1.data() == s ); in test() 65 constexpr std::basic_string_view<char, constexpr_char_traits<char>> sv1 ( "ABCDE" ); in main() local 66 static_assert ( sv1.size() == 5, ""); in main()
|
/external/libcxx/test/std/strings/string.view/string.view.modifiers/ |
D | remove_suffix.pass.cpp | 24 SV sv1 ( s ); in test() local 25 assert ( sv1.size() == len ); in test() 26 assert ( sv1.data() == s ); in test() 29 sv1.remove_suffix ( 1 ); in test() 30 assert ( sv1.size() == (len - 1)); in test() 31 assert ( sv1.data() == s); in test() 32 sv1.remove_suffix ( len - 1 ); in test() 35 assert ( sv1.size() == 0 ); in test() 36 sv1.remove_suffix ( 0 ); in test() 37 assert ( sv1.size() == 0 ); in test() [all …]
|
D | remove_prefix.pass.cpp | 25 SV sv1 ( s ); in test() local 26 assert ( sv1.size() == len ); in test() 27 assert ( sv1.data() == s ); in test() 30 sv1.remove_prefix ( 1 ); in test() 31 assert ( sv1.size() == (len - 1)); in test() 32 assert ( sv1.data() == (s + 1)); in test() 33 sv1.remove_prefix ( len - 1 ); in test() 36 assert ( sv1.size() == 0 ); in test() 37 sv1.remove_prefix ( 0 ); in test() 38 assert ( sv1.size() == 0 ); in test() [all …]
|
D | swap.pass.cpp | 24 SV sv1(s); in test() local 27 assert ( sv1.size() == len ); in test() 28 assert ( sv1.data() == s ); in test() 31 sv1.swap ( sv2 ); in test() 32 assert ( sv1.size() == 0 ); in test() 42 SV sv1{ "ABCDEFGHIJKL", n }; in test_ce() local 43 SV sv2 { sv1.data(), k }; in test_ce() 44 sv1.swap ( sv2 ); in test_ce() 45 return sv1.size(); in test_ce()
|
/external/libcxx/test/std/strings/string.view/string.view.comparison/ |
D | opeq.string_view.pointer.pass.cpp | 56 constexpr SV sv1; in main() local 58 static_assert ( sv1 == "", "" ); in main() 59 static_assert ( "" == sv1, "" ); in main() 60 static_assert (!(sv1 == "abcde"), "" ); in main() 61 static_assert (!("abcde" == sv1), "" ); in main()
|
D | opne.string_view.pointer.pass.cpp | 56 constexpr SV sv1; in main() local 59 static_assert (!(sv1 != ""), "" ); in main() 60 static_assert (!("" != sv1), "" ); in main() 61 static_assert ( sv1 != "abcde", "" ); in main() 62 static_assert ( "abcde" != sv1, "" ); in main()
|
D | oplt.string_view.pointer.pass.cpp | 56 constexpr SV sv1; in main() local 59 static_assert (!(sv1 < ""), "" ); in main() 60 static_assert (!("" < sv1), "" ); in main() 61 static_assert ( sv1 < "abcde", "" ); in main() 62 static_assert (!("abcde" < sv1), "" ); in main()
|
D | opge.string_view.pointer.pass.cpp | 56 constexpr SV sv1; in main() local 59 static_assert ( sv1 >= "", "" ); in main() 60 static_assert ( "" >= sv1, "" ); in main() 61 static_assert (!(sv1 >= "abcde"), "" ); in main() 62 static_assert ( "abcde" >= sv1, "" ); in main()
|
D | opgt.string_view.pointer.pass.cpp | 56 constexpr SV sv1; in main() local 59 static_assert (!(sv1 > ""), "" ); in main() 60 static_assert (!("" > sv1), "" ); in main() 61 static_assert (!(sv1 > "abcde"), "" ); in main() 62 static_assert ( "abcde" > sv1, "" ); in main()
|
D | ople.string_view.pointer.pass.cpp | 56 constexpr SV sv1; in main() local 59 static_assert ( sv1 <= "", "" ); in main() 60 static_assert ( "" <= sv1, "" ); in main() 61 static_assert ( sv1 <= "abcde", "" ); in main() 62 static_assert (!("abcde" <= sv1), "" ); in main()
|
D | opgt.string_view.string_view.pass.cpp | 55 constexpr SV sv1; in main() local 58 static_assert (!(sv1 > sv1), "" ); in main() 61 static_assert (!(sv1 > sv2), "" ); in main() 62 static_assert ( sv2 > sv1, "" ); in main()
|