diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-04-23 07:05:07 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-04-23 07:05:42 +0000 |
commit | 6b07c8b29bc9fc2e22ec06b058143ae089c6bffd (patch) | |
tree | b30ce947d2ad657b1bf972c5b2ddd7bba4b81b2b /searchlib/src/tests/attribute/stringattribute | |
parent | 2d89d3298b442be57fe00433e1958f05f9cfa2e6 (diff) |
Add testing of too short strings.
Diffstat (limited to 'searchlib/src/tests/attribute/stringattribute')
-rw-r--r-- | searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp b/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp index ec711b4a456..84ed72d42ca 100644 --- a/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp +++ b/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp @@ -419,6 +419,7 @@ TEST("test uncased match") { EXPECT_FALSE(helper.isMatch("xyza")); EXPECT_TRUE(helper.isMatch("xyz")); EXPECT_TRUE(helper.isMatch("XyZ")); + EXPECT_FALSE(helper.isMatch("Xy")); } TEST("test uncased prefix match") { @@ -432,6 +433,7 @@ TEST("test uncased prefix match") { EXPECT_TRUE(helper.isMatch("xYza")); EXPECT_TRUE(helper.isMatch("xyz")); EXPECT_TRUE(helper.isMatch("XyZ")); + EXPECT_FALSE(helper.isMatch("Xy")); } TEST("test cased match") { @@ -445,6 +447,7 @@ TEST("test cased match") { EXPECT_FALSE(helper.isMatch("xyz")); EXPECT_FALSE(helper.isMatch("Xyz")); EXPECT_TRUE(helper.isMatch("XyZ")); + EXPECT_FALSE(helper.isMatch("Xy")); } TEST("test cased prefix match") { @@ -459,6 +462,7 @@ TEST("test cased prefix match") { EXPECT_FALSE(helper.isMatch("xyz")); EXPECT_FALSE(helper.isMatch("Xyz")); EXPECT_TRUE(helper.isMatch("XyZ")); + EXPECT_FALSE(helper.isMatch("Xy")); } TEST("test uncased regex match") { @@ -472,6 +476,7 @@ TEST("test uncased regex match") { EXPECT_TRUE(helper.isMatch("xyZ")); EXPECT_TRUE(helper.isMatch("xyz")); EXPECT_FALSE(helper.isMatch("xyaZ")); + EXPECT_FALSE(helper.isMatch("xy")); } TEST("test cased regex match") { @@ -486,6 +491,7 @@ TEST("test cased regex match") { EXPECT_TRUE(helper.isMatch("xYZ")); EXPECT_FALSE(helper.isMatch("xYz")); EXPECT_FALSE(helper.isMatch("xaYZ")); + EXPECT_FALSE(helper.isMatch("xY")); } TEST_MAIN() { TEST_RUN_ALL(); } |