8000 Test `issue_convert_valid_utf32_to_latin1_2104d5a31440e3ed` shows inconsistency in implementations · Issue #760 · simdutf/simdutf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
10000
Test issue_convert_valid_utf32_to_latin1_2104d5a31440e3ed shows inconsistency in implementations #760
Open
@WojciechMula

Description

@WojciechMula
  const auto outlen = implementation.latin1_length_from_utf32(data_len);
  ASSERT_EQUAL(outlen, 1);
  std::vector<char> output(outlen);
  const auto r = implementation.convert_valid_utf32_to_latin1(
      (const char32_t *)data, data_len, output.data());
  /*
   * fallback gets 1, the others 0
   */
  ASSERT_EQUAL(r, 0);

The comment and assertion states something violating our spec. The spec for convert_valid_utf32_to_latin1 says "number of written code units; 0 if conversion is not possible".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0