diff --git a/test/util-test.cc b/test/util-test.cc index c7f242f5..34d382c8 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -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(); test_count_digits();