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

Side by Side Diff: tests/compiler/dart2js/categories_test.dart

Issue 2684793002: Fix tests broken by ac6bf5926f60e81454ec5d2350a12b50d8b7481e (Closed)
Patch Set: Created 3 years, 10 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 | tests/compiler/dart2js/missing_file_test.dart » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import 'package:async_helper/async_helper.dart'; 6 import 'package:async_helper/async_helper.dart';
7 7
8 import "memory_compiler.dart"; 8 import "memory_compiler.dart";
9 9
10 runTest(String source, String categories, int expectedErrors) async { 10 runTest(String source, String categories, int expectedErrors) async {
11 var collector = new DiagnosticCollector(); 11 var collector = new DiagnosticCollector();
12 await runCompiler( 12 await runCompiler(
13 memorySourceFiles: {"main.dart": source}, 13 memorySourceFiles: {"main.dart": source},
14 options: ["--categories=$categories"], 14 options: ["--categories=$categories"],
15 diagnosticHandler: collector); 15 diagnosticHandler: collector);
16 Expect.equals(expectedErrors, collector.errors.length); 16 Expect.equals(expectedErrors, collector.errors.length);
17 Expect.equals(0, collector.warnings.length); 17 Expect.equals(0, collector.warnings.length);
18 } 18 }
19 19
20 void main() { 20 void main() {
21 asyncTest(() async { 21 asyncTest(() async {
22 await runTest("import 'dart:async'; main() {}", "Client", 0); 22 await runTest("import 'dart:async'; main() {}", "Client", 0);
23 await runTest("import 'dart:async'; main() {}", "Server", 0); 23 await runTest("import 'dart:async'; main() {}", "Server", 0);
24 await runTest("import 'dart:html'; main() {}", "Client", 0); 24 await runTest("import 'dart:html'; main() {}", "Client", 0);
25 await runTest("import 'dart:html'; main() {}", "Server", 1); 25 await runTest("import 'dart:html'; main() {}", "Server", 1);
26 await runTest("import 'dart:io'; main() {}", "Client", 1); 26 // Importing dart:io is temporarily allowed as a stopgap measure for the
27 // lack of config specific imports. Once that is added, this will be
28 // disallowed again.
29 await runTest("import 'dart:io'; main() {}", "Client", 0);
27 await runTest("import 'dart:io'; main() {}", "Server", 0); 30 await runTest("import 'dart:io'; main() {}", "Server", 0);
28 }); 31 });
29 } 32 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/missing_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698