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

Unified Diff: tests/corelib/regexp/negative-special-characters_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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: tests/corelib/regexp/negative-special-characters_test.dart
diff --git a/tests/corelib/regexp/negative-special-characters_test.dart b/tests/corelib/regexp/negative-special-characters_test.dart
index 5fda4c9320142a4de1ae77b66b58c3b359a8f67a..2c673b156e5ae7855e65c459ff51eb18182d41b3 100644
--- a/tests/corelib/regexp/negative-special-characters_test.dart
+++ b/tests/corelib/regexp/negative-special-characters_test.dart
@@ -26,23 +26,22 @@ import 'v8_regexp_utils.dart';
import 'package:expect/expect.dart';
void main() {
- description(
- "This test checks Unicode in negative RegExp character classes."
- );
+ description("This test checks Unicode in negative RegExp character classes.");
- dynamic testPassed(str) { }
+ dynamic testPassed(str) {}
dynamic testFailed(str) => Expect.fail(str);
dynamic test(pattern, str, expected_length) {
- var result = str.replaceAll(new RegExp(pattern, caseSensitive: false, multiLine: true), '');
+ var result = str.replaceAll(
+ new RegExp(pattern, caseSensitive: false, multiLine: true), '');
if (result.length == expected_length)
testPassed('"' + pattern + '", ' + '"' + str + '".');
else
- testFailed('"' + pattern + '", ' + '"' + str + '". Was "' + result + '".');
+ testFailed(
+ '"' + pattern + '", ' + '"' + str + '". Was "' + result + '".');
}
-
test("\\s", " \t\f\v\r\n", 0); // ASCII whitespace.
test("\\S", "Проверка", 0); // Cyrillic letters are non-whitespace...
test("\\s", "Проверка", 8); // ...and they aren't whitespace.
@@ -54,7 +53,8 @@ void main() {
test("\\S\\S", "уф", 0);
test("\\S{2}", "уф", 0);
- test("\\w", "Проверка", 8); // Alas, only ASCII characters count as word ones in JS.
+ test("\\w", "Проверка",
+ 8); // Alas, only ASCII characters count as word ones in JS.
test("\\W", "Проверка", 0);
test("[\\w]", "Проверка", 8);
test("[\\W]", "Проверка", 0);

Powered by Google App Engine
This is Rietveld 408576698