mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
AK+Everywhere: Turn bool keep_empty to an enum in split* functions
This commit is contained in:
parent
f485db2501
commit
3e8b5ac920
44 changed files with 96 additions and 81 deletions
|
@ -233,7 +233,7 @@ TEST_CASE(split)
|
|||
EXPECT_EQ(parts[0], "a");
|
||||
EXPECT_EQ(parts[1], "b");
|
||||
|
||||
parts = test.split(' ', true);
|
||||
parts = test.split(' ', SplitBehavior::KeepEmpty);
|
||||
EXPECT_EQ(parts.size(), 5u);
|
||||
EXPECT_EQ(parts[0], "a");
|
||||
EXPECT_EQ(parts[1], "");
|
||||
|
@ -243,9 +243,9 @@ TEST_CASE(split)
|
|||
|
||||
test = "axxbx";
|
||||
EXPECT_EQ(test.split('x').size(), 2u);
|
||||
EXPECT_EQ(test.split('x', true).size(), 4u);
|
||||
EXPECT_EQ(test.split('x', SplitBehavior::KeepEmpty).size(), 4u);
|
||||
EXPECT_EQ(test.split_view('x').size(), 2u);
|
||||
EXPECT_EQ(test.split_view('x', true).size(), 4u);
|
||||
EXPECT_EQ(test.split_view('x', SplitBehavior::KeepEmpty).size(), 4u);
|
||||
}
|
||||
|
||||
TEST_CASE(builder_zero_initial_capacity)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue