mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Test that StringRef size computation
This commit is contained in:
parent
d5a6316d5c
commit
10d83aaa52
@ -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_count_digits<uint32_t>();
|
||||
test_count_digits<uint64_t>();
|
||||
|
Loading…
Reference in New Issue
Block a user