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

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

Issue 1408253006: Introduce "platform configurations" to replace categories and libraries.dart. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix create_sdk scripts according to review Created 5 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 unified diff | Download patch
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() {}", "Embedded", 1);
23 await runTest("import 'dart:async'; main() {}", "Client", 0); 22 await runTest("import 'dart:async'; main() {}", "Client", 0);
24 await runTest("import 'dart:async'; main() {}", "Server", 0); 23 await runTest("import 'dart:async'; main() {}", "Server", 0);
25 await runTest("import 'dart:html'; main() {}", "Embedded", 1);
26 await runTest("import 'dart:html'; main() {}", "Client", 0); 24 await runTest("import 'dart:html'; main() {}", "Client", 0);
27 await runTest("import 'dart:html'; main() {}", "Server", 1); 25 await runTest("import 'dart:html'; main() {}", "Server", 1);
28 await runTest("import 'dart:io'; main() {}", "Embedded", 1);
29 await runTest("import 'dart:io'; main() {}", "Client", 1); 26 await runTest("import 'dart:io'; main() {}", "Client", 1);
30 await runTest("import 'dart:io'; main() {}", "Server", 0); 27 await runTest("import 'dart:io'; main() {}", "Server", 0);
31 await runTest("import 'dart:_internal'; main() {}", "Embedded", 2); 28 await runTest("import 'dart:_internal'; main() {}", "Client", 1);
32 await runTest("import 'dart:_internal'; main() {}", "Client", 2); 29 await runTest("import 'dart:_internal'; main() {}", "Server", 1);
33 await runTest("import 'dart:_internal'; main() {}", "Server", 2);
34 }); 30 });
35 } 31 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/backend_dart/dart_backend_test.dart ('k') | tests/compiler/dart2js/library_resolution_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698