mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Add a test case for https://github.com/cppformat/cppformat/pull/47
This commit is contained in:
parent
e2cbee77b8
commit
da9457da61
@ -267,6 +267,16 @@ TEST(ArrayTest, Append) {
|
||||
EXPECT_EQ(15u, array.capacity());
|
||||
}
|
||||
|
||||
TEST(ArrayTest, AppendAllocatesEnoughStorage) {
|
||||
Array<char, 10> array;
|
||||
const char *test = "abcdefgh";
|
||||
array.resize(10);
|
||||
array.append(test, test + 9);
|
||||
EXPECT_STREQ("test", &array[10]);
|
||||
EXPECT_EQ(19u, array.size());
|
||||
EXPECT_EQ(19u, array.capacity());
|
||||
}
|
||||
|
||||
TEST(WriterTest, Ctor) {
|
||||
Writer w;
|
||||
EXPECT_EQ(0u, w.size());
|
||||
|
Loading…
Reference in New Issue
Block a user