mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
TestStringView: Add test for starts_with
This commit is contained in:
parent
05f641a5a9
commit
a574e1ab84
Notes:
sideshowbarker
2024-07-19 12:08:34 +09:00
Author: https://github.com/MinusGix
Commit: a574e1ab84
Pull-request: https://github.com/SerenityOS/serenity/pull/545
1 changed files with 9 additions and 0 deletions
|
@ -33,4 +33,13 @@ TEST_CASE(compare_views)
|
||||||
EXPECT_EQ(view1, "foo");
|
EXPECT_EQ(view1, "foo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE(starts_with)
|
||||||
|
{
|
||||||
|
String test_string = "ABCDEF";
|
||||||
|
StringView test_string_view = test_string.view();
|
||||||
|
EXPECT(test_string_view.starts_with("AB"));
|
||||||
|
EXPECT(test_string_view.starts_with("ABCDEF"));
|
||||||
|
EXPECT(!test_string_view.starts_with("DEF"));
|
||||||
|
}
|
||||||
|
|
||||||
TEST_MAIN(StringView)
|
TEST_MAIN(StringView)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue