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

Unified Diff: utils/tests/string_encoding/unicode_tests.dart

Issue 9410001: restructure string decoding to support iterable use and include benchmarks for UTF-8 decoding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: "stop using introduced variable _length. Improve docs. Created 8 years, 10 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
« no previous file with comments | « utils/tests/string_encoding/unicode_core_tests.dart ('k') | utils/tests/string_encoding/utf16_tests.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/string_encoding/unicode_tests.dart
diff --git a/utils/tests/string_encoding/unicode_tests.dart b/utils/tests/string_encoding/unicode_tests.dart
index 53114e4b27c5502eaecfaa1b07c71cf9d481b3b7..7188fe1ca820f7078e7a5ec91956e0bf1b03a31b 100755
--- a/utils/tests/string_encoding/unicode_tests.dart
+++ b/utils/tests/string_encoding/unicode_tests.dart
@@ -25,6 +25,8 @@ class UnicodeTests extends TestClass {
void registerTests(TestSuite suite) {
register("testCodepointsToString", testCodepointsToString, suite);
register("testStringToCodepoints", testStringToCodepoints, suite);
+ register("testEmptyCodepointsToString", testEmptyCodepointsToString, suite);
+ register("testEmptyStringToCodepoints", testEmptyStringToCodepoints, suite);
}
void testStringToCodepoints() {
@@ -34,4 +36,12 @@ class UnicodeTests extends TestClass {
void testCodepointsToString() {
Expect.stringEquals(testPhrase, codepointsToString(testCodepoints));
}
+
+ void testEmptyCodepointsToString() {
+ Expect.stringEquals("", codepointsToString(<int>[]));
+ }
+
+ void testEmptyStringToCodepoints() {
+ Expect.listEquals([], stringToCodepoints(""));
+ }
}
« no previous file with comments | « utils/tests/string_encoding/unicode_core_tests.dart ('k') | utils/tests/string_encoding/utf16_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698