diff --git a/src/node_builtins.cc b/src/node_builtins.cc index cfb4b5ab031dba..e9bf8a5a0e0b7e 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -248,10 +248,10 @@ bool BuiltinLoader::Add(const char* id, std::string_view utf8source) { size_t expected_u16_length = simdutf::utf16_length_from_utf8(utf8source.data(), utf8source.length()); auto out = std::make_shared>(expected_u16_length); - size_t u16_length = simdutf::convert_utf8_to_utf16le( - utf8source.data(), - utf8source.length(), - reinterpret_cast(out->data())); + size_t u16_length = + simdutf::convert_utf8_to_utf16(utf8source.data(), + utf8source.length(), + reinterpret_cast(out->data())); out->resize(u16_length); return Add(id, UnionBytes(out)); } diff --git a/test/cctest/test_util.cc b/test/cctest/test_util.cc index 443a03117c09fc..5b83e07db3b7c2 100644 --- a/test/cctest/test_util.cc +++ b/test/cctest/test_util.cc @@ -299,17 +299,3 @@ TEST(UtilTest, SPrintF) { const std::string with_zero = std::string("a") + '\0' + 'b'; EXPECT_EQ(SPrintF("%s", with_zero), with_zero); } - -TEST(UtilTest, SimdutfEndiannessDoesNotMeanEndianness) { - // In simdutf, "LE" does *not* refer to Little Endian, it refers - // to 16-byte code units that are stored using *host* endianness. - // This is weird and confusing naming, and so we add this assertion - // here to verify that this is actually the case (so that CI tells - // us if it changed, because for most people Little Endian is - // host endianness, so locally everything would work fine). - const char utf8source[] = "\xe7\x8c\xab"; - char16_t u16output; - size_t u16len = simdutf::convert_utf8_to_utf16le(utf8source, 3, &u16output); - EXPECT_EQ(u16len, 1u); - EXPECT_EQ(u16output, 0x732B); -}