mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
TestStringView: Add test for starts_with
This commit is contained in:
parent
05f641a5a9
commit
a574e1ab84
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…
Add table
Add a link
Reference in a new issue