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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Smoke test of the dart2js compiler API. 5 // Smoke test of the dart2js compiler API.
6 library analyze_only; 6 library analyze_only;
7 7
8 import "package:expect/expect.dart";
8 import 'dart:async'; 9 import 'dart:async';
9 import 'dart:uri'; 10 import 'dart:uri';
10 11
11 import '../../utils/dummy_compiler_test.dart' as dummy; 12 import '../../utils/dummy_compiler_test.dart' as dummy;
12 import '../../../sdk/lib/_internal/compiler/compiler.dart'; 13 import '../../../sdk/lib/_internal/compiler/compiler.dart';
13 14
14 runCompiler(String main, List<String> options, 15 runCompiler(String main, List<String> options,
15 onValue(String code, List errors, List warnings)) { 16 onValue(String code, List errors, List warnings)) {
16 List errors = new List(); 17 List errors = new List();
17 List warnings = new List(); 18 List warnings = new List();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 """Foo foo; // Unresolved and analyzed. 121 """Foo foo; // Unresolved and analyzed.
121 main() {}""", 122 main() {}""",
122 ['--analyze-only', '--analyze-all'], 123 ['--analyze-only', '--analyze-all'],
123 (String code, List errors, List warnings) { 124 (String code, List errors, List warnings) {
124 Expect.isNull(code); 125 Expect.isNull(code);
125 Expect.isTrue(errors.isEmpty); 126 Expect.isTrue(errors.isEmpty);
126 Expect.equals(1, warnings.length); 127 Expect.equals(1, warnings.length);
127 Expect.equals('Warning: cannot resolve type Foo', warnings[0].toString()); 128 Expect.equals('Warning: cannot resolve type Foo', warnings[0].toString());
128 }); 129 });
129 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698