Lines Matching refs:expected

56 constexpr bool is_equal(View& view, const Expected& expected) {  in is_equal()  argument
61 auto expected_it = expected.begin(); in is_equal()
62 for (; actual_it != view.end() && expected_it != expected.end(); ++actual_it, ++expected_it) { in is_equal()
67 return actual_it == view.end() && expected_it == expected.end(); in is_equal()
71 constexpr bool test_function_call(T&& input, Separator&& separator, std::array<U, M> expected) { in test_function_call() argument
73 return is_equal(v, expected); in test_function_call()
77 constexpr bool test_with_piping(T&& input, Separator&& separator, std::array<U, M> expected) { in test_with_piping() argument
78 auto expected_it = expected.begin(); in test_with_piping()
80 if (expected_it == expected.end()) in test_with_piping()
88 return expected_it == expected.end(); in test_with_piping()
162 constexpr void test_one(T&& input, Separator&& separator, std::array<U, M> expected) { in test_one() argument
163 assert(test_function_call(input, separator, expected)); in test_one()
164 assert(test_with_piping(input, separator, expected)); in test_one()
169 assert(test_function_call(CopyableView(input), ForwardTinyView(separator), expected)); in test_one()
170 assert(test_with_piping(CopyableView(input), ForwardTinyView(separator), expected)); in test_one()
172 assert(test_function_call(InputView(input), ForwardTinyView(separator), expected)); in test_one()
173 assert(test_with_piping(InputView(input), ForwardTinyView(separator), expected)); in test_one()
189 std::array expected = {"abc"sv, std::string_view("def", sizeof("def"))}; in test_string_literals() local
191 assert(test_function_call("abc def", short_sep, expected)); in test_string_literals()
192 assert(test_with_piping("abc def", short_sep, expected)); in test_string_literals()
193 assert(test_function_call("abc12def", long_sep, expected)); in test_string_literals()
194 assert(test_with_piping("abc12def", long_sep, expected)); in test_string_literals()
200 std::array expected = {std::string_view("", 1)}; in test_string_literals() local
202 assert(test_function_call("", short_sep, expected)); in test_string_literals()
203 assert(test_with_piping("", short_sep, expected)); in test_string_literals()
204 assert(test_function_call("", long_sep, expected)); in test_string_literals()
205 assert(test_with_piping("", long_sep, expected)); in test_string_literals()
223 std::array expected = {"a"sv, "b"sv, "c"sv, "\0"sv}; in test_string_literals() local
225 assert(test_function_call("abc", empty_sep, expected)); in test_string_literals()
226 assert(test_with_piping("abc", empty_sep, expected)); in test_string_literals()
285 std::array expected = {"abc"sv, "def"sv}; in main_test() local
286 test_one("abc def"sv, short_sep, expected); in main_test()
287 test_one("abc12def"sv, long_sep, expected); in main_test()
292 std::array expected = {"abc"sv, ""sv, ""sv, ""sv, "def"sv}; in main_test() local
293 test_one("abc def"sv, short_sep, expected); in main_test()
294 test_one("abc12121212def"sv, long_sep, expected); in main_test()
299 std::array expected = {"abc"sv, "def"sv, ""sv}; in main_test() local
300 test_one("abc def "sv, short_sep, expected); in main_test()
301 test_one("abc12def12"sv, long_sep, expected); in main_test()
306 std::array expected = {""sv, "abc"sv, "def"sv}; in main_test() local
307 test_one(" abc def"sv, short_sep, expected); in main_test()
308 test_one("12abc12def"sv, long_sep, expected); in main_test()
313 std::array expected = {"abc"sv}; in main_test() local
314 test_one("abc"sv, short_sep, expected); in main_test()
315 test_one("abc"sv, long_sep, expected); in main_test()
320 std::array expected = {""sv, ""sv}; in main_test() local
321 test_one(" "sv, short_sep, expected); in main_test()
322 test_one("12"sv, long_sep, expected); in main_test()
327 std::array expected = {""sv, ""sv, ""sv, ""sv}; in main_test() local
328 test_one(" "sv, short_sep, expected); in main_test()
329 test_one("121212"sv, long_sep, expected); in main_test()
335 std::array expected = {""sv, "aa"sv}; in main_test() local
336 test_one("aaaaa"sv, overlapping_sep, expected); in main_test()
341 std::array expected = {""sv, ""sv, "abc"sv, ""sv, ""sv, "def"sv, ""sv, ""sv}; in main_test() local
342 test_one(" abc def "sv, short_sep, expected); in main_test()
343 test_one("1212abc121212def1212"sv, long_sep, expected); in main_test()
348 std::array expected = {""sv, "a"sv, "b"sv, "c"sv, ""sv}; in main_test() local
349 test_one(" a b c "sv, short_sep, expected); in main_test()
350 test_one("12a12b12c12"sv, long_sep, expected); in main_test()
356 std::array expected = {"a"sv, "aa"sv, ""sv, "b"sv}; in main_test() local
357 test_one("aabaaababb"sv, overlapping_sep, expected); in main_test()
362 std::array<std::string_view, 0> expected = {}; in main_test() local
363 test_one(""sv, short_sep, expected); in main_test()
364 test_one(""sv, long_sep, expected); in main_test()
370 std::array expected = {"a"sv, "b"sv, "c"sv}; in main_test() local
371 test_one("abc"sv, empty_sep, expected); in main_test()
372 test_one("abc"sv, empty_sep, expected); in main_test()
377 std::array expected = {"abc"sv, "def"sv}; in main_test() local
378 test_one("abc\0def"sv, '\0', expected); in main_test()
379 test_one("abc\0\0def"sv, "\0\0"sv, expected); in main_test()
400 std::array expected = {std::array{1, 2, 3}, std::array{4, 5, 6}}; in main_test()
401 test_one(std::array{1, 2, 3, 0, 4, 5, 6}, 0, expected); in main_test()
402 test_one(std::array{1, 2, 3, 0, 0, 0, 4, 5, 6}, std::array{0, 0, 0}, expected); in main_test()