Test string startsWith() function.
| 262 | |
| 263 | // Test string startsWith() function. |
| 264 | TEST_F(ExtensionTest, TestStartsWithFunction) { |
| 265 | // Empty string, non-empty prefix - never matches. |
| 266 | EXPECT_NO_FATAL_FAILURE(TestStringStartsWith("", "p", false)); |
| 267 | // Prefix of 0 length - always matches. |
| 268 | EXPECT_NO_FATAL_FAILURE(TestStringStartsWith("", "", true)); |
| 269 | EXPECT_NO_FATAL_FAILURE(TestStringStartsWith("prefixedString", "", true)); |
| 270 | // Non-empty matching prefix. |
| 271 | EXPECT_NO_FATAL_FAILURE( |
| 272 | TestStringStartsWith("prefixedString", "prefix", true)); |
| 273 | // Non-empty mismatching prefix. |
| 274 | EXPECT_NO_FATAL_FAILURE(TestStringStartsWith("prefixedString", "x", false)); |
| 275 | EXPECT_NO_FATAL_FAILURE( |
| 276 | TestStringStartsWith("prefixedString", "prefixedString1", false)); |
| 277 | } |
| 278 | |
| 279 | // Test string startsWith() function. |
| 280 | TEST_F(ExtensionTest, TestEndsWithFunction) { |
nothing calls this directly
no test coverage detected