util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL

This commit is contained in:
Max Kellermann
2017-11-10 19:24:33 +01:00
parent 523051132d
commit 49784513b1
51 changed files with 142 additions and 142 deletions

View File

@@ -23,7 +23,7 @@ public:
constexpr char input[] = "foo.bar";
const DivideString ds(input, '.');
CPPUNIT_ASSERT(ds.IsDefined());
CPPUNIT_ASSERT(!ds.IsEmpty());
CPPUNIT_ASSERT(!ds.empty());
CPPUNIT_ASSERT_EQUAL(0, strcmp(ds.GetFirst(), "foo"));
CPPUNIT_ASSERT_EQUAL(input + 4, ds.GetSecond());
}
@@ -32,7 +32,7 @@ public:
constexpr char input[] = ".bar";
const DivideString ds(input, '.');
CPPUNIT_ASSERT(ds.IsDefined());
CPPUNIT_ASSERT(ds.IsEmpty());
CPPUNIT_ASSERT(ds.empty());
CPPUNIT_ASSERT_EQUAL(0, strcmp(ds.GetFirst(), ""));
CPPUNIT_ASSERT_EQUAL(input + 1, ds.GetSecond());
}
@@ -47,7 +47,7 @@ public:
constexpr char input[] = " foo\t.\nbar\r";
const DivideString ds(input, '.', true);
CPPUNIT_ASSERT(ds.IsDefined());
CPPUNIT_ASSERT(!ds.IsEmpty());
CPPUNIT_ASSERT(!ds.empty());
CPPUNIT_ASSERT_EQUAL(0, strcmp(ds.GetFirst(), "foo"));
CPPUNIT_ASSERT_EQUAL(input + 7, ds.GetSecond());
}