mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +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: https://github.com/SerenityOS/serenity/commit/a574e1ab846 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");
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue