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

Side by Side Diff: runtime/observatory/tests/service/regexp_function_test.dart

Issue 2212643002: Removed warnings from test (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Removed warnings from test Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // VMOptions= 4 // VMOptions=
5 // VMOptions=--interpret_irregexp 5 // VMOptions=--interpret_irregexp
6 6
7 import "package:expect/expect.dart";
8 import 'package:observatory/service_io.dart'; 7 import 'package:observatory/service_io.dart';
9 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
10 import 'test_helper.dart'; 9 import 'test_helper.dart';
11 10
12 var regex0; 11 var regex0;
13 var regex; 12 var regex;
14 13
15 void script() { 14 void script() {
16 // Check the internal NUL doesn't trip up the name scrubbing in the vm. 15 // Check the internal NUL doesn't trip up the name scrubbing in the vm.
17 regex0 = new RegExp("with internal \u{0} NUL"); 16 regex0 = new RegExp("with internal \u{0} NUL");
18 regex = new RegExp(r"(\w+)"); 17 regex = new RegExp(r"(\w+)");
19 String str = "Parse my string"; 18 String str = "Parse my string";
20 Iterable<Match> matches = regex.allMatches(str); // Run to generate bytecode. 19 Iterable<Match> matches = regex.allMatches(str); // Run to generate bytecode.
21 Expect.equals(3, matches.length); 20 expect(matches.length, equals(3));
22 } 21 }
23 22
24 var tests = [ 23 var tests = [
25 24
26 (Isolate isolate) async { 25 (Isolate isolate) async {
27 Library lib = isolate.rootLibrary; 26 Library lib = isolate.rootLibrary;
28 await lib.load(); 27 await lib.load();
29 28
30 Field field0 = lib.variables.singleWhere((v) => v.name == 'regex0'); 29 Field field0 = lib.variables.singleWhere((v) => v.name == 'regex0');
31 await field0.load(); // No crash due to embedded NUL. 30 await field0.load(); // No crash due to embedded NUL.
(...skipping 20 matching lines...) Expand all
52 var f3 = await regex.externalOneByteFunction.load(); 51 var f3 = await regex.externalOneByteFunction.load();
53 expect(f3 is ServiceFunction, isTrue); 52 expect(f3 is ServiceFunction, isTrue);
54 var f4 = await regex.externalTwoByteFunction.load(); 53 var f4 = await regex.externalTwoByteFunction.load();
55 expect(f4 is ServiceFunction, isTrue); 54 expect(f4 is ServiceFunction, isTrue);
56 } 55 }
57 } 56 }
58 57
59 ]; 58 ];
60 59
61 main(args) => runIsolateTests(args, tests, testeeBefore: script); 60 main(args) => runIsolateTests(args, tests, testeeBefore: script);
62
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698