The test suite seems to assume that sizeof(tiny_utf8::string)
is 32 chars and bases some asserts on this, e.g. inside AppendString
:
tiny_utf8::string str = U"Hello ツ";
str.append(U" ♫ World");
EXPECT_EQ(str.length(), 15);
EXPECT_EQ(str.size(), 19);
EXPECT_TRUE(str.requires_unicode());
EXPECT_TRUE(str.sso_active());
EXPECT_FALSE(str.lut_active());
However, on i686, sizeof(tiny_utf8::string)
is 16 chars, which means the string literal used in this test is too large for SSO, and the EXPECT_TRUE(str.sso_active())
assertions fails.
Steps to reproduce
- Install 32-bit gtest and gmock libraries
- Build the test suite in 32-bit mode (e.g. using
-DCMAKE_CXX_FLAGS="-m32"
)
- Run the test suite