mirror of
https://github.com/znc/znc.git
synced 2026-06-11 09:15:01 +02:00
test: replace gmock matchers in Split test with gtest equivalents
StringTest.cpp does not include gmock, so EXPECT_THAT/ElementsAre/IsEmpty do not compile and the unittest target fails on every CI configuration. Use EXPECT_EQ against a VCString and EXPECT_TRUE(empty()) instead, which keeps the test scope identical without dragging gmock into this file.
This commit is contained in:
+2
-2
@@ -190,11 +190,11 @@ TEST(StringTest, Split) {
|
||||
// element (or zero elements if the input itself is empty).
|
||||
VCString vempty;
|
||||
EXPECT_EQ(CS("abc").Split("", vempty, false), 1u);
|
||||
EXPECT_THAT(vempty, ElementsAre("abc"));
|
||||
EXPECT_EQ(vempty, VCString({"abc"}));
|
||||
EXPECT_EQ(CS("abc").Split("", vempty, true), 1u);
|
||||
EXPECT_EQ(vempty, VCString({"abc"}));
|
||||
EXPECT_EQ(CS("").Split("", vempty, false), 0u);
|
||||
EXPECT_THAT(vempty, IsEmpty());
|
||||
EXPECT_TRUE(vempty.empty());
|
||||
}
|
||||
|
||||
TEST(StringTest, NamedFormat) {
|
||||
|
||||
Reference in New Issue
Block a user