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

Unified Diff: runtime/observatory/tests/service/regexp_function_test.dart

Issue 2759973004: Fix observatory tests broken by running dartfmt. Temporarily reverted formatting for evaluate_activ… (Closed)
Patch Set: Created 3 years, 9 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/observatory/tests/service/regexp_function_test.dart
diff --git a/runtime/observatory/tests/service/regexp_function_test.dart b/runtime/observatory/tests/service/regexp_function_test.dart
index 4736266fa3cb5321ae27cf68a86185ec6340b962..d599972aa03a32ecb8e3e118b6af495dfb832b71 100644
--- a/runtime/observatory/tests/service/regexp_function_test.dart
+++ b/runtime/observatory/tests/service/regexp_function_test.dart
@@ -16,45 +16,43 @@ void script() {
regex0 = new RegExp("with internal \u{0} NUL");
regex = new RegExp(r"(\w+)");
String str = "Parse my string";
- Iterable<Match> matches = regex.allMatches(str); // Run to generate bytecode.
+ Iterable<Match> matches = regex.allMatches(str); // Run to generate bytecode.
expect(matches.length, equals(3));
}
var tests = [
-
-(Isolate isolate) async {
- Library lib = isolate.rootLibrary;
- await lib.load();
-
- Field field0 = lib.variables.singleWhere((v) => v.name == 'regex0');
- await field0.load(); // No crash due to embedded NUL.
-
- Field field = lib.variables.singleWhere((v) => v.name == 'regex');
- await field.load();
- Instance regex = field.staticValue;
- expect(regex.isInstance, isTrue);
- expect(regex.isRegExp, isTrue);
- await regex.load();
-
- if (regex.oneByteFunction == null) {
- // Running with interpreted regexp.
- var b1 = await regex.oneByteBytecode.load();
- expect(b1.isTypedData, isTrue);
- var b2 = await regex.twoByteBytecode.load();
- expect(b2.isTypedData, isFalse); // No two-byte string subject was used.
- } else {
- // Running with compiled regexp.
- var f1 = await regex.oneByteFunction.load();
- expect(f1 is ServiceFunction, isTrue);
- var f2 = await regex.twoByteFunction.load();
- expect(f2 is ServiceFunction, isTrue);
- var f3 = await regex.externalOneByteFunction.load();
- expect(f3 is ServiceFunction, isTrue);
- var f4 = await regex.externalTwoByteFunction.load();
- expect(f4 is ServiceFunction, isTrue);
+ (Isolate isolate) async {
+ Library lib = isolate.rootLibrary;
+ await lib.load();
+
+ Field field0 = lib.variables.singleWhere((v) => v.name == 'regex0');
+ await field0.load(); // No crash due to embedded NUL.
+
+ Field field = lib.variables.singleWhere((v) => v.name == 'regex');
+ await field.load();
+ Instance regex = field.staticValue;
+ expect(regex.isInstance, isTrue);
+ expect(regex.isRegExp, isTrue);
+ await regex.load();
+
+ if (regex.oneByteFunction == null) {
+ // Running with interpreted regexp.
+ var b1 = await regex.oneByteBytecode.load();
+ expect(b1.isTypedData, isTrue);
+ var b2 = await regex.twoByteBytecode.load();
+ expect(b2.isTypedData, isFalse); // No two-byte string subject was used.
+ } else {
+ // Running with compiled regexp.
+ var f1 = await regex.oneByteFunction.load();
+ expect(f1 is ServiceFunction, isTrue);
+ var f2 = await regex.twoByteFunction.load();
+ expect(f2 is ServiceFunction, isTrue);
+ var f3 = await regex.externalOneByteFunction.load();
+ expect(f3 is ServiceFunction, isTrue);
+ var f4 = await regex.externalTwoByteFunction.load();
+ expect(f4 is ServiceFunction, isTrue);
+ }
}
-}
-
];
main(args) => runIsolateTests(args, tests, testeeBefore: script);
« no previous file with comments | « runtime/observatory/tests/service/read_stream_test.dart ('k') | runtime/observatory/tests/service/regress_28443_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698