1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:37:45 +00:00

AK+Everywhere: Stop including Vector.h from StringView.h

Preparation for using Error.h from Vector.h. This required moving some
things out of line.
This commit is contained in:
Andreas Kling 2021-11-10 11:05:21 +01:00
parent e52f987020
commit 5f7d008791
27 changed files with 88 additions and 51 deletions

View file

@ -8,6 +8,7 @@
#include <AK/AllOf.h>
#include <AK/Array.h>
#include <AK/Vector.h>
TEST_CASE(should_determine_if_predicate_applies_to_all_elements_in_container)
{

View file

@ -8,6 +8,7 @@
#include <AK/AnyOf.h>
#include <AK/Array.h>
#include <AK/Vector.h>
TEST_CASE(should_determine_if_predicate_applies_to_any_element_in_container)
{

View file

@ -8,6 +8,7 @@
#include <AK/BinarySearch.h>
#include <AK/Span.h>
#include <AK/Vector.h>
#include <cstring>
#include <new>

View file

@ -8,6 +8,7 @@
#include <AK/DisjointChunks.h>
#include <AK/String.h>
#include <AK/Vector.h>
TEST_CASE(basic)
{

View file

@ -8,6 +8,7 @@
#include <AK/StdLibExtras.h>
#include <AK/TypeList.h>
#include <AK/Vector.h>
template<typename F, typename... Args>
F for_each_argument(F f, Args&&... args)

View file

@ -9,6 +9,7 @@
#include <AK/Optional.h>
#include <AK/String.h>
#include <AK/Vector.h>
TEST_CASE(basic_optional)
{

View file

@ -9,6 +9,7 @@
#include <AK/FlyString.h>
#include <AK/String.h>
#include <AK/StringBuilder.h>
#include <AK/Vector.h>
#include <cstring>
TEST_CASE(construct_empty)

View file

@ -7,6 +7,7 @@
#include <LibTest/TestCase.h>
#include <AK/StringUtils.h>
#include <AK/Vector.h>
TEST_CASE(matches_null)
{

View file

@ -7,6 +7,7 @@
#include <LibTest/TestCase.h>
#include <AK/String.h>
#include <AK/Vector.h>
TEST_CASE(construct_empty)
{
@ -157,7 +158,7 @@ TEST_CASE(split_view)
EXPECT_EQ(test_string_view.split_view("xx", true), Vector<StringView>({ "a", "bc", "d", "" }));
test_string_view = "ax_b_cxd";
auto predicate = [](char ch) { return ch == 'x' || ch == '_'; };
Function<bool(char)> predicate = [](char ch) { return ch == 'x' || ch == '_'; };
EXPECT_EQ(test_string_view.split_view_if(predicate), Vector<StringView>({ "a", "b", "c", "d" }));
EXPECT_EQ(test_string_view.split_view_if(predicate, true), Vector<StringView>({ "a", "", "b", "c", "d" }));
EXPECT_EQ(test_string_view.split_view_if(predicate), Vector<StringView>({ "a", "b", "c", "d" }));

View file

@ -7,6 +7,7 @@
#include <LibTest/TestCase.h>
#include <AK/StringBuilder.h>
#include <AK/Vector.h>
#include <LibC/regex.h>
#include <stdio.h>