Home
last modified time | relevance | path

Searched +full:- +full:sv (Results 1 – 25 of 1491) sorted by relevance

12345678910>>...60

/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/utilities/format/format.functions/
H A Dlocale-specific_form.pass.cpp1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-localization
10 // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
12 // XFAIL: availability-fp_to_chars-missing
15 // XFAIL: LIBCXX-ANDROID-FIXME
17 // REQUIRES: locale.en_US.UTF-8
21 // This test the locale-specific form for these formatting functions:
102 #define SV(S) MAKE_STRING_VIEW(CharT, S) macro
[all …]
H A Dformat_tests.h1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
25 // TestFunction must be callable as check(expected-result, string-to-format, args-to-format...)
26 // ExceptionTest must be callable as check_exception(expected-exception, string-to-format, args-to-
36 …result.push_back(SV("Invalid formatter type {:" #T "}")); … in invalid_types()
83 check(SV("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), in format_test_buffer_copy()
84 SV("{}"), in format_test_buffer_copy()
85 SV("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")); in format_test_buffer_copy()
87 check(SV("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" in format_test_buffer_copy()
[all …]
H A Dunicode.pass.cpp1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
12 // UNSUPPORTED: libcpp-has-no-unicode
14 // TODO FMT This test should not require std::to_chars(floating-point)
15 // XFAIL: availability-fp_to_chars-missing
20 // It tests [format.string.std]/8 - 11:
21 // - Properly determining the estimated with of a unicode string.
22 // - Properly truncating to the wanted maximum width.
[all …]
H A Descaped_output.unicode.pass.cpp1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
12 // UNSUPPORTED: libcpp-has-no-unicode
14 // TODO FMT This test should not require std::to_chars(floating-point)
15 // XFAIL: availability-fp_to_chars-missing
40 #define SV(S) MAKE_STRING_VIEW(CharT, S) macro
153 test_format(SV("['\\'', '\"']"), SV("[{:?}, {:?}]"), CharT('\''), CharT('"')); in test_char()
156 test_format(SV("'\\t'"), SV("{:?}"), CharT('\t')); in test_char()
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/strings/basic.string/string.ops/string_compare/
H A Dsize_size_T_size_size.pass.cpp1 //===----------------------------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
29 return -1; in sign()
33 template <class S, class SV>
38 SV sv, in test() argument
42 static_assert((!std::is_same<S, SV>::value), ""); in test()
43 if (pos1 <= s.size() && pos2 <= sv.size()) in test()
44 assert(sign(s.compare(pos1, n1, sv, pos2, n2)) == sign(x)); in test()
48 TEST_IGNORE_NODISCARD s.compare(pos1, n1, sv, pos2, n2); in test()
[all …]
H A Dsize_size_string_view.pass.cpp1 //===----------------------------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // int compare(size_type pos1, size_type n1, basic_string_view sv) const; // constexpr since C++20
25 return -1; in sign()
29 template <class S, class SV>
30 …R_CXX20 void test(const S& s, typename S::size_type pos1, typename S::size_type n1, SV sv, int x) { in test() argument
32 assert(sign(s.compare(pos1, n1, sv)) == sign(x)); in test()
36 TEST_IGNORE_NODISCARD s.compare(pos1, n1, sv); in test()
45 template <class S, class SV>
[all …]
/aosp_15_r20/external/libcxx/test/std/strings/basic.string/string.ops/string_compare/
H A Dsize_size_T_size_size.pass.cpp1 //===----------------------------------------------------------------------===//
8 //===----------------------------------------------------------------------===//
31 return -1; in sign()
35 template <class S, class SV>
38 SV sv, typename S::size_type pos2, typename S::size_type n2, int x) in test() argument
40 static_assert((!std::is_same<S, SV>::value), ""); in test()
41 if (pos1 <= s.size() && pos2 <= sv.size()) in test()
42 assert(sign(s.compare(pos1, n1, sv, pos2, n2)) == sign(x)); in test()
48 TEST_IGNORE_NODISCARD s.compare(pos1, n1, sv, pos2, n2); in test()
53 assert(pos1 > s.size() || pos2 > sv.size()); in test()
[all …]
H A Dsize_size_string_view.pass.cpp1 //===----------------------------------------------------------------------===//
8 //===----------------------------------------------------------------------===//
12 // int compare(size_type pos1, size_type n1, basic_string_vew sv) const;
27 return -1; in sign()
31 template <class S, class SV>
34 SV sv, int x) in test() argument
37 assert(sign(s.compare(pos1, n1, sv)) == sign(x)); in test()
43 TEST_IGNORE_NODISCARD s.compare(pos1, n1, sv); in test()
54 template <class S, class SV>
57 test(S(""), 0, 0, SV(""), 0); in test0()
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/utilities/format/format.range/format.range.fmtset/
H A Dformat.functions.tests.h1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
31 // Note when no range-underlying-spec is present the char is escaped, in test_char_default()
32 check(SV("{'a', 'b', 'c'}"), SV("{}"), input); in test_char_default()
33 check(SV("{'a', 'b', 'c'}^42"), SV("{}^42"), input); in test_char_default()
34 check(SV("{'a', 'b', 'c'}^42"), SV("{:}^42"), input); in test_char_default()
36 check(SV("{a, b, c}"), SV("{::}"), input); in test_char_default()
37 check(SV("{a, b, c}"), SV("{::<}"), input); in test_char_default()
39 check(SV("{'a', 'b', 'c'}"), SV("{::?}"), input); in test_char_default()
[all …]
/aosp_15_r20/external/pigweed/pw_tokenizer/pw_tokenizer_private/
H A Dvarint_decoding_test_data.h7 // https://www.apache.org/licenses/LICENSE-2.0
15 // AUTOGENERATED - DO NOT EDIT
26 // clang-format off
32 TestCase("%d", "0", "%u", "0", "\x00"sv),
33 TestCase("%d", "-32768", "%u", "4294934528", "\xff\xff\x03"sv),
34 TestCase("%d", "-32767", "%u", "4294934529", "\xfd\xff\x03"sv),
35 TestCase("%d", "32766", "%u", "32766", "\xfc\xff\x03"sv),
36 TestCase("%d", "32767", "%u", "32767", "\xfe\xff\x03"sv),
37 TestCase("%d", "-2147483648", "%u", "2147483648", "\xff\xff\xff\xff\x0f"sv),
38 TestCase("%d", "-2147483647", "%u", "2147483649", "\xfd\xff\xff\xff\x0f"sv),
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/utilities/format/format.range/format.range.formatter/
H A Dformat.functions.tests.h1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
35 // Note when no range-underlying-spec is present the char is escaped, in test_char_default()
36 check(SV("['H', 'e', 'l', 'l', 'o']"), SV("{}"), input); in test_char_default()
37 check(SV("['H', 'e', 'l', 'l', 'o']^42"), SV("{}^42"), input); in test_char_default()
38 check(SV("['H', 'e', 'l', 'l', 'o']^42"), SV("{:}^42"), input); in test_char_default()
41 check(SV("[H, e, l, l, o]"), SV("{::}"), input); in test_char_default()
42 check(SV("[H, e, l, l, o]"), SV("{::<}"), input); in test_char_default()
44 check(SV("['H', 'e', 'l', 'l', 'o']"), SV("{::?}"), input); in test_char_default()
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/strings/basic.string/string.modifiers/string_insert/
H A Dsize_T_size_size.pass.cpp1 //===----------------------------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
23 template <class S, class SV>
25 test(S s, typename S::size_type pos1, SV sv, typename S::size_type pos2, typename S::size_type n, S… in test() argument
26 static_assert((!std::is_same<S, SV>::value), ""); in test()
29 if (pos1 <= old_size && pos2 <= sv.size()) { in test()
30 s.insert(pos1, sv, pos2, n); in test()
37 s.insert(pos1, sv, pos2, n); in test()
40 assert(pos1 > old_size || pos2 > sv.size()); in test()
[all …]
/aosp_15_r20/external/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/
H A Dsize_T_size_size.pass.cpp1 //===----------------------------------------------------------------------===//
8 //===----------------------------------------------------------------------===//
24 template <class S, class SV>
26 test(S s, typename S::size_type pos1, SV sv, typename S::size_type pos2, in test() argument
29 static_assert((!std::is_same<S, SV>::value), ""); in test()
32 if (pos1 <= old_size && pos2 <= sv.size()) in test()
34 s.insert(pos1, sv, pos2, n); in test()
43 s.insert(pos1, sv, pos2, n); in test()
48 assert(pos1 > old_size || pos2 > sv.size()); in test()
55 template <class S, class SV>
[all …]
H A Dstring_view.pass.cpp1 //===----------------------------------------------------------------------===//
8 //===----------------------------------------------------------------------===//
13 // insert(size_type pos, string_view sv);
22 template <class S, class SV>
24 test(S s, typename S::size_type pos, SV sv, S expected) in test() argument
30 s.insert(pos, sv); in test()
39 s.insert(pos, sv); in test()
55 typedef std::string_view SV; in main() typedef
56 test(S(""), 0, SV(""), S("")); in main()
57 test(S(""), 0, SV("12345"), S("12345")); in main()
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/containers/container.adaptors/container.adaptors.format/
H A Dformat.functions.tests.h1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
31 // Note when no range-underlying-spec is present the char is escaped, in test_char_default()
32 check(SV("['H', 'e', 'l', 'l', 'o']"), SV("{}"), input); in test_char_default()
33 check(SV("['H', 'e', 'l', 'l', 'o']^42"), SV("{}^42"), input); in test_char_default()
34 check(SV("['H', 'e', 'l', 'l', 'o']^42"), SV("{:}^42"), input); in test_char_default()
37 check(SV("[H, e, l, l, o]"), SV("{::}"), input); in test_char_default()
38 check(SV("[H, e, l, l, o]"), SV("{::<}"), input); in test_char_default()
40 check(SV("['H', 'e', 'l', 'l', 'o']"), SV("{::?}"), input); in test_char_default()
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/utilities/format/format.range/format.range.fmtmap/
H A Dformat.functions.tests.h1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
29 check(SV("{'a': 'A', 'b': 'B', 'c': 'C'}"), SV("{}"), input); in test_char()
30 check(SV("{'a': 'A', 'b': 'B', 'c': 'C'}^42"), SV("{}^42"), input); in test_char()
31 check(SV("{'a': 'A', 'b': 'B', 'c': 'C'}^42"), SV("{:}^42"), input); in test_char()
33 // ***** underlying has no format-spec in test_char()
35 // *** align-fill & width *** in test_char()
36 check(SV("{'a': 'A', 'b': 'B', 'c': 'C'} "), SV("{:35}"), input); in test_char()
37 check(SV("{'a': 'A', 'b': 'B', 'c': 'C'}*****"), SV("{:*<35}"), input); in test_char()
[all …]
/aosp_15_r20/external/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/
H A Dsize_size_string_view.pass.cpp1 //===----------------------------------------------------------------------===//
8 //===----------------------------------------------------------------------===//
13 // replace(size_type pos1, size_type n1, basic_string_view<charT,traits> sv);
23 template <class S, class SV>
25 test(S s, typename S::size_type pos1, typename S::size_type n1, SV sv, S expected) in test() argument
31 s.replace(pos1, n1, sv); in test()
34 typename S::size_type xlen = std::min(n1, old_size - pos1); in test()
35 typename S::size_type rlen = sv.size(); in test()
36 assert(s.size() == old_size - xlen + rlen); in test()
43 s.replace(pos1, n1, sv); in test()
[all …]
H A Diter_iter_string_view.pass.cpp1 //===----------------------------------------------------------------------===//
8 //===----------------------------------------------------------------------===//
13 // replace(const_iterator i1, const_iterator i2, basic_string_view<charT,traits> sv);
22 template <class S, class SV>
24 test(S s, typename S::size_type pos1, typename S::size_type n1, SV sv, S expected) in test() argument
29 typename S::size_type xlen = last - first; in test()
30 s.replace(first, last, sv); in test()
33 typename S::size_type rlen = sv.size(); in test()
34 assert(s.size() == old_size - xlen + rlen); in test()
37 template <class S, class SV>
[all …]
H A Dsize_size_T_size_size.pass.cpp1 //===----------------------------------------------------------------------===//
8 //===----------------------------------------------------------------------===//
26 template <class S, class SV>
29 SV sv, typename S::size_type pos2, typename S::size_type n2, in test() argument
33 static_assert((!std::is_same<S, SV>::value), ""); in test()
37 static_assert(sizeof(SizeT) == sizeof(typename SV::size_type), ""); in test()
41 if (pos1 <= old_size && pos2 <= sv.size()) in test()
43 s.replace(pos1, n1, sv, pos2, n2); in test()
46 SizeT xlen = std::min<SizeT>(n1, old_size - pos1); in test()
47 SizeT rlen = std::min<SizeT>(n2, sv.size() - pos2); in test()
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/strings/basic.string/string.modifiers/string_replace/
H A Dsize_size_string_view.pass.cpp1 //===----------------------------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 // replace(size_type pos1, size_type n1, basic_string_view<charT,traits> sv); // constexpr since …
23 template <class S, class SV>
24 TEST_CONSTEXPR_CXX20 void test(S s, typename S::size_type pos1, typename S::size_type n1, SV sv, S … in test() argument
28 s.replace(pos1, n1, sv); in test()
31 typename S::size_type xlen = std::min(n1, old_size - pos1); in test()
32 typename S::size_type rlen = sv.size(); in test()
33 assert(s.size() == old_size - xlen + rlen); in test()
[all …]
H A Diter_iter_string_view.pass.cpp1 //===----------------------------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 // replace(const_iterator i1, const_iterator i2, basic_string_view<charT,traits> sv); // constexp…
21 template <class S, class SV>
22 TEST_CONSTEXPR_CXX20 void test(S s, typename S::size_type pos1, typename S::size_type n1, SV sv, S … in test() argument
26 typename S::size_type xlen = last - first; in test()
27 s.replace(first, last, sv); in test()
30 typename S::size_type rlen = sv.size(); in test()
31 assert(s.size() == old_size - xlen + rlen); in test()
[all …]
H A Dsize_size_T_size_size.pass.cpp1 //===----------------------------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
28 template <class S, class SV>
33 SV sv, in test() argument
38 static_assert((!std::is_same<S, SV>::value), ""); in test()
42 static_assert(sizeof(SizeT) == sizeof(typename SV::size_type), ""); in test()
46 if (pos1 <= old_size && pos2 <= sv.size()) { in test()
47 s.replace(pos1, n1, sv, pos2, n2); in test()
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/time/time.syn/
H A Dformatter.duration.pass.cpp1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-localization
10 // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
12 // XFAIL: availability-fp_to_chars-missing
14 // REQUIRES: locale.fr_FR.UTF-8
15 // REQUIRES: locale.ja_JP.UTF-8
41 check(SV("1as"), SV("{}"), std::chrono::duration<int, std::atto>(1)); in test_no_chrono_specs()
42 check(SV("1fs"), SV("{}"), std::chrono::duration<int, std::femto>(1)); in test_no_chrono_specs()
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/utilities/format/format.tuple/
H A Dformat.functions.tests.h1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
21 static constexpr basic_string_view<CharT> color_names[] = {SV("black"), SV("red"), SV("gold")};
32 check(SV("(42, 99)"), SV("{}"), input);
33 check(SV("(42, 99)^42"), SV("{}^42"), input);
34 check(SV("(42, 99)^42"), SV("{:}^42"), input);
36 // *** align-fill & width ***
37 check(SV("(42, 99) "), SV("{:13}"), input);
38 check(SV("(42, 99)*****"), SV("{:*<13}"), input);
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/utilities/format/format.range/format.range.fmtstr/
H A Dformat.functions.tests.h1 //===----------------------------------------------------------------------===//
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
61 check(SV("hello"), SV("{}"), input); in test_string()
62 check(SV("hello^42"), SV("{}^42"), input); in test_string()
63 check(SV("hello^42"), SV("{:}^42"), input); in test_string()
65 // *** align-fill & width *** in test_string()
66 check(SV("hello "), SV("{:10}"), input); in test_string()
67 check(SV("hello*****"), SV("{:*<10}"), input); in test_string()
68 check(SV("__hello___"), SV("{:_^10}"), input); in test_string()
[all …]

12345678910>>...60