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

Unified Diff: tests/corelib/string_trim_unicode_test.dart

Issue 11411092: Revert "Add some support for the code-point code-unit distinction." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « tests/corelib/string_from_list_test.dart ('k') | tests/corelib/surrogate_pair_toUpper_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/string_trim_unicode_test.dart
diff --git a/tests/corelib/string_trim_unicode_test.dart b/tests/corelib/string_trim_unicode_test.dart
deleted file mode 100644
index 3fdc952d6eb0f7733e8f82364a6ed3608356461e..0000000000000000000000000000000000000000
--- a/tests/corelib/string_trim_unicode_test.dart
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-class Range {
- final int from;
- final int to;
- const Range(this.from, this.to);
-}
-
-class StringTrimTest {
- static testMain() {
- var spaces = [
- const Range(9, 13), // Control characters, not in the Zs category.
- const Range(32, 32),
- const Range(0xa0, 0xa0),
- const Range(0x1680, 0x1680),
- const Range(0x180e, 0x180e),
- const Range(0x2000, 0x200a),
- // LINE SEPARATOR, category Zl and PARAGRAPH SEPARATOR, category Zp.
- const Range(0x2028, 0x2029),
- const Range(0x202f, 0x202f),
- const Range(0x205f, 0x205f),
- const Range(0x3000, 0x3000),
- const Range(0xfeff, 0xfeff)]; // Unicode BOM.
- for (int range in spaces) {
- for (int i = range.from - 1; i <= range.to + 1; i++) {
- print("Check $i");
- if (i >= range.from && i <= range.to) {
- Expect.equals(
- new String.fromCharCodes([i, 'f'.charCodeAt(0), i]).trim(), 'f');
- } else {
- Expect.isFalse('f' ==
- new String.fromCharCodes([i, 'f'.charCodeAt(0), i]).trim());
- }
- }
- }
- // 0x85 NEL Next line is not in the Unicode Zs category and it not special
- // cased in the ES5 spec either.
- Expect.isFalse('f' ==
- new String.fromCharCodes([0x85, 'f'.charCodeAt(0), 0x85]).trim());
- }
-}
-
-main() {
- StringTrimTest.testMain();
-}
« no previous file with comments | « tests/corelib/string_from_list_test.dart ('k') | tests/corelib/surrogate_pair_toUpper_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698