Commit 10d83aaa authored by Victor Zverovich's avatar Victor Zverovich

Test that StringRef size computation

parent d5a6316d
......@@ -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>();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment