util/DivideString: remove unused library
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Unit tests for src/util/
|
||||
*/
|
||||
|
||||
#include "util/DivideString.hxx"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(DivideString, Basic)
|
||||
{
|
||||
constexpr char input[] = "foo.bar";
|
||||
const DivideString ds(input, '.');
|
||||
EXPECT_TRUE(ds.IsDefined());
|
||||
EXPECT_FALSE(ds.empty());
|
||||
EXPECT_EQ(0, strcmp(ds.GetFirst(), "foo"));
|
||||
EXPECT_EQ(input + 4, ds.GetSecond());
|
||||
}
|
||||
|
||||
TEST(DivideString, Empty)
|
||||
{
|
||||
constexpr char input[] = ".bar";
|
||||
const DivideString ds(input, '.');
|
||||
EXPECT_TRUE(ds.IsDefined());
|
||||
EXPECT_TRUE(ds.empty());
|
||||
EXPECT_EQ(0, strcmp(ds.GetFirst(), ""));
|
||||
EXPECT_EQ(input + 1, ds.GetSecond());
|
||||
}
|
||||
|
||||
TEST(DivideString, Fail)
|
||||
{
|
||||
constexpr char input[] = "foo!bar";
|
||||
const DivideString ds(input, '.');
|
||||
EXPECT_FALSE(ds.IsDefined());
|
||||
}
|
||||
|
||||
TEST(DivideString, Strip)
|
||||
{
|
||||
constexpr char input[] = " foo\t.\nbar\r";
|
||||
const DivideString ds(input, '.', true);
|
||||
EXPECT_TRUE(ds.IsDefined());
|
||||
EXPECT_FALSE(ds.empty());
|
||||
EXPECT_EQ(0, strcmp(ds.GetFirst(), "foo"));
|
||||
EXPECT_EQ(input + 7, ds.GetSecond());
|
||||
}
|
@@ -3,7 +3,6 @@ test(
|
||||
executable(
|
||||
'TestUtil',
|
||||
'TestCircularBuffer.cxx',
|
||||
'TestDivideString.cxx',
|
||||
'TestException.cxx',
|
||||
'TestIntrusiveForwardList.cxx',
|
||||
'TestIntrusiveHashSet.cxx',
|
||||
|
Reference in New Issue
Block a user