Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1829)

Unified Diff: runtime/vm/object_test.cc

Issue 2400523003: Fix bad canonicalization for strings whose utf32->utf16 conversion is lossy. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object_test.cc
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 73e2d707c1aa25e111892a218e69362df0da906d..8ef4c94c200ec50c39d118f2745daa8e075c88e6 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -4726,4 +4726,15 @@ VM_TEST_CASE(String_ScrubName) {
}
}
+
+VM_TEST_CASE(String_EqualsUTF32) {
hausner 2016/10/06 22:14:41 Maybe a short comment what is being tested here an
rmacnak 2016/10/06 23:16:29 Done.
+ int32_t char_codes[] = {
+ 0, 0x0a, 0x0d, 0x7f, 0xff, 0xffff, 0xd800, 0xdc00, 0xdbff, 0xdfff
+ };
+
+ const String& str =
+ String::Handle(String::FromUTF32(char_codes, ARRAY_SIZE(char_codes)));
+ EXPECT(str.Equals(char_codes, ARRAY_SIZE(char_codes)));
+}
+
} // namespace dart
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698