edponce commented on a change in pull request #11298:
URL: https://github.com/apache/arrow/pull/11298#discussion_r720711626
##########
File path: cpp/src/arrow/compute/kernels/scalar_string_test.cc
##########
@@ -449,6 +449,30 @@ TYPED_TEST(TestStringKernels, Utf8Reverse) {
ASSERT_TRUE(res->array()->buffers[1]->Equals(*malformed_input->data()->buffers[1]));
}
+TYPED_TEST(TestStringKernels, Utf8Nfd) {
+ this->CheckUnary("utf8_nfd", "[]", this->type(), "[]");
+ this->CheckUnary("utf8_nfd", R"(["①②3", null, "", "áéífi 0😀"])", this->type(),
+ R"(["①②3", null, "", "áéífi 0😀"])");
+}
+
+TYPED_TEST(TestStringKernels, Utf8Nfkd) {
+ this->CheckUnary("utf8_nfkd", "[]", this->type(), "[]");
+ this->CheckUnary("utf8_nfkd", R"(["①②3", null, "", "áéífi 0😀"])",
this->type(),
+ R"(["123", null, "", "áéífi 0😀"])");
+}
+
+TYPED_TEST(TestStringKernels, Utf8Nfc) {
+ this->CheckUnary("utf8_nfc", "[]", this->type(), "[]");
+ this->CheckUnary("utf8_nfc", R"(["①②3", null, "", "áéífi 0😀"])", this->type(),
+ R"(["①②3", null, "", "áéífi 0😀"])");
+}
Review comment:
It would be good to have test cases that do change input string when
normalized. Similarly, for `utf8_nfd`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]