Lines Matching refs:expected

32 constexpr bool is_equal(View& view, const Expected& expected) {  in is_equal()  argument
33 return std::ranges::equal(view, expected, std::ranges::equal); in is_equal()
37 constexpr bool test_function_call(T&& input, Separator&& separator, std::array<U, M> expected) { in test_function_call() argument
39 return is_equal(v, expected); in test_function_call()
43 constexpr bool test_with_piping(T&& input, Separator&& separator, std::array<U, M> expected) { in test_with_piping() argument
44 auto expected_it = expected.begin(); in test_with_piping()
46 if (expected_it == expected.end()) in test_with_piping()
54 return expected_it == expected.end(); in test_with_piping()
128 constexpr void test_one(T&& input, Separator&& separator, std::array<U, M> expected) { in test_one() argument
129 assert(test_function_call(input, separator, expected)); in test_one()
130 assert(test_with_piping(input, separator, expected)); in test_one()
145 std::array expected = {"abc"sv, std::string_view("def", sizeof("def"))}; in test_string_literals() local
147 assert(test_function_call("abc def", short_sep, expected)); in test_string_literals()
148 assert(test_with_piping("abc def", short_sep, expected)); in test_string_literals()
149 assert(test_function_call("abc12def", long_sep, expected)); in test_string_literals()
150 assert(test_with_piping("abc12def", long_sep, expected)); in test_string_literals()
156 std::array expected = {std::string_view("", 1)}; in test_string_literals() local
158 assert(test_function_call("", short_sep, expected)); in test_string_literals()
159 assert(test_with_piping("", short_sep, expected)); in test_string_literals()
160 assert(test_function_call("", long_sep, expected)); in test_string_literals()
161 assert(test_with_piping("", long_sep, expected)); in test_string_literals()
179 std::array expected = {"a"sv, "b"sv, "c"sv, "\0"sv}; in test_string_literals() local
181 assert(test_function_call("abc", empty_sep, expected)); in test_string_literals()
182 assert(test_with_piping("abc", empty_sep, expected)); in test_string_literals()
241 std::array expected = {"abc"sv, "def"sv}; in main_test() local
242 test_one("abc def"sv, short_sep, expected); in main_test()
243 test_one("abc12def"sv, long_sep, expected); in main_test()
248 std::array expected = {"abc"sv, ""sv, ""sv, ""sv, "def"sv}; in main_test() local
249 test_one("abc def"sv, short_sep, expected); in main_test()
250 test_one("abc12121212def"sv, long_sep, expected); in main_test()
255 std::array expected = {"abc"sv, "def"sv, ""sv}; in main_test() local
256 test_one("abc def "sv, short_sep, expected); in main_test()
257 test_one("abc12def12"sv, long_sep, expected); in main_test()
262 std::array expected = {""sv, "abc"sv, "def"sv}; in main_test() local
263 test_one(" abc def"sv, short_sep, expected); in main_test()
264 test_one("12abc12def"sv, long_sep, expected); in main_test()
269 std::array expected = {"abc"sv}; in main_test() local
270 test_one("abc"sv, short_sep, expected); in main_test()
271 test_one("abc"sv, long_sep, expected); in main_test()
276 std::array expected = {""sv, ""sv}; in main_test() local
277 test_one(" "sv, short_sep, expected); in main_test()
278 test_one("12"sv, long_sep, expected); in main_test()
283 std::array expected = {""sv, ""sv, ""sv, ""sv}; in main_test() local
284 test_one(" "sv, short_sep, expected); in main_test()
285 test_one("121212"sv, long_sep, expected); in main_test()
291 std::array expected = {""sv, "aa"sv}; in main_test() local
292 test_one("aaaaa"sv, overlapping_sep, expected); in main_test()
297 std::array expected = {""sv, ""sv, "abc"sv, ""sv, ""sv, "def"sv, ""sv, ""sv}; in main_test() local
298 test_one(" abc def "sv, short_sep, expected); in main_test()
299 test_one("1212abc121212def1212"sv, long_sep, expected); in main_test()
304 std::array expected = {""sv, "a"sv, "b"sv, "c"sv, ""sv}; in main_test() local
305 test_one(" a b c "sv, short_sep, expected); in main_test()
306 test_one("12a12b12c12"sv, long_sep, expected); in main_test()
312 std::array expected = {"a"sv, "aa"sv, ""sv, "b"sv}; in main_test() local
313 test_one("aabaaababb"sv, overlapping_sep, expected); in main_test()
318 std::array<std::string_view, 0> expected = {}; in main_test() local
319 test_one(""sv, short_sep, expected); in main_test()
320 test_one(""sv, long_sep, expected); in main_test()
326 std::array expected = {"a"sv, "b"sv, "c"sv}; in main_test() local
327 test_one("abc"sv, empty_sep, expected); in main_test()
328 test_one("abc"sv, empty_sep, expected); in main_test()
333 std::array expected = {"abc"sv, "def"sv}; in main_test() local
334 test_one("abc\0def"sv, '\0', expected); in main_test()
335 test_one("abc\0\0def"sv, "\0\0"sv, expected); in main_test()
356 std::array expected = {std::array{1, 2, 3}, std::array{4, 5, 6}}; in main_test()
357 test_one(std::array{1, 2, 3, 0, 4, 5, 6}, 0, expected); in main_test()
358 test_one(std::array{1, 2, 3, 0, 0, 0, 4, 5, 6}, std::array{0, 0, 0}, expected); in main_test()
372 auto expected = {"the"sv, "quick"sv, "brown"sv, "fox"sv};
373 assert(std::ranges::equal(result, expected));