Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Tests fail on i686 #75

@suve

Description

@suve

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

  1. Install 32-bit gtest and gmock libraries
  2. Build the test suite in 32-bit mode (e.g. using -DCMAKE_CXX_FLAGS="-m32")
  3. Run the test suite

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions