mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Test that StringRef size computation
This commit is contained in:
@ -698,6 +698,12 @@ void test_count_digits() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(UtilTest, StringRef) {
|
||||||
|
char space[PATH_MAX];
|
||||||
|
snprintf(space, sizeof(space), "some string");
|
||||||
|
EXPECT_EQ(sizeof("some string") - 1, StringRef(space).size());
|
||||||
|
}
|
||||||
|
|
||||||
TEST(UtilTest, CountDigits) {
|
TEST(UtilTest, CountDigits) {
|
||||||
test_count_digits<uint32_t>();
|
test_count_digits<uint32_t>();
|
||||||
test_count_digits<uint64_t>();
|
test_count_digits<uint64_t>();
|
||||||
|
Reference in New Issue
Block a user