Zebin support

Change-Id: I1e426ee2c5174fd0a4c51c1644cda467c2b88881
This commit is contained in:
Jaroslaw Chodor
2020-07-30 13:18:54 +02:00
parent 855c474aaf
commit 321f649854
27 changed files with 4763 additions and 18 deletions

View File

@@ -74,6 +74,20 @@ TEST(ConstStringRef, WhenComparingAgainstContainersThenUsesLexicographicOrdering
std::string strTex("Tex");
EXPECT_TRUE(strTex != constStrText);
EXPECT_TRUE(constStrText != strTex);
EXPECT_TRUE(ConstStringRef("Text") == "Text");
EXPECT_TRUE("Text" == ConstStringRef("Text"));
EXPECT_FALSE(ConstStringRef("Tex") == "Text");
EXPECT_FALSE("Text" == ConstStringRef("Tex"));
EXPECT_FALSE(ConstStringRef("Tex") == "Text");
EXPECT_FALSE("Text" == ConstStringRef("Tex"));
EXPECT_FALSE(ConstStringRef("Text") != "Text");
EXPECT_FALSE("Text" != ConstStringRef("Text"));
EXPECT_TRUE(ConstStringRef("Tex") != "Text");
EXPECT_TRUE("Text" != ConstStringRef("Tex"));
EXPECT_TRUE(ConstStringRef("Tex") != "Text");
EXPECT_TRUE("Text" != ConstStringRef("Tex"));
}
TEST(ConstStringRef, WhenStrIsCalledThenEmitsProperString) {
@@ -189,3 +203,16 @@ TEST(ConstStringRefEqualsCaseInsesitive, WhenStringsIdenticalThenReturnTrue) {
TEST(ConstStringRefEqualsCaseInsesitive, WhenStringsDifferOnlyByCaseThenReturnTrue) {
EXPECT_TRUE(equalsCaseInsesitive(ConstStringRef("aBc"), ConstStringRef("Abc")));
}
TEST(ConstStringStartsWith, GivenRightPrefixThenReturnsTrue) {
ConstStringRef str = "some text";
EXPECT_TRUE(str.startsWith("some"));
EXPECT_TRUE(str.startsWith("some text"));
}
TEST(ConstStringStartsWith, GivenInvalidPrefixThenReturnsFalse) {
ConstStringRef str = "some text";
EXPECT_FALSE(str.startsWith("ome"));
EXPECT_FALSE(str.startsWith("some text "));
EXPECT_FALSE(str.startsWith("substr some text"));
}