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

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

Issue 48133002: Remove deprecated dart:utf library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged to head. Created 7 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
« no previous file with comments | « utils/tests/string_encoding/utf8_benchmarks.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/string_encoding/utf8_test.dart
diff --git a/utils/tests/string_encoding/utf8_test.dart b/utils/tests/string_encoding/utf8_test.dart
index 09fee3c055828d03d023056721eb604ed3a1524a..4070426f96f36b9864a885ec6c8568b69b9d9fbb 100755
--- a/utils/tests/string_encoding/utf8_test.dart
+++ b/utils/tests/string_encoding/utf8_test.dart
@@ -5,7 +5,7 @@
library utf8_tests;
import 'dunit.dart';
-import '../../../lib/utf/utf.dart';
+import '../../../lib/convert/convert.dart';
void main() {
TestSuite suite = new TestSuite();
@@ -149,6 +149,10 @@ class Utf8Tests extends TestClass {
"Katakana to utf8");
}
+ List encodeUtf8(String text) => UTF8.encode(text);
+ String decodeUtf8(List bytes) => UTF8.decode(bytes);
+ List utf8ToCodePoints(List bytes) => UTF8.decode(bytes).runes.toList();
+
void testUtf8bytesToCodepoints() {
Expect.listEquals([954, 972, 963, 956, 949],
utf8ToCodepoints([0xce, 0xba, 0xcf, 0x8c, 0xcf,
« no previous file with comments | « utils/tests/string_encoding/utf8_benchmarks.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698