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

Side by Side Diff: tests/compiler/dart2js/jsinterop/abstract_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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
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 4
5 library jsinterop.abstract_test; 5 library jsinterop.abstract_test;
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'package:compiler/src/common.dart'; 9 import 'package:compiler/src/common.dart';
10 import '../memory_compiler.dart'; 10 import '../memory_compiler.dart';
11 11
12 void main() { 12 void main() {
13 asyncTest(() async { 13 asyncTest(() async {
14 DiagnosticCollector collector = new DiagnosticCollector(); 14 DiagnosticCollector collector = new DiagnosticCollector();
15 await runCompiler( 15 await runCompiler(diagnosticHandler: collector, memorySourceFiles: const {
16 diagnosticHandler: collector, 16 'main.dart': '''
17 memorySourceFiles: const {'main.dart': '''
18 import 'package:js/js.dart'; 17 import 'package:js/js.dart';
19 18
20 @JS() 19 @JS()
21 class A { 20 class A {
22 get foo; 21 get foo;
23 } 22 }
24 23
25 main() => new A(); 24 main() => new A();
26 '''}); 25 '''
27 Expect.equals(0, collector.errors.length, 26 });
28 'Unexpected error count.'); 27 Expect.equals(0, collector.errors.length, 'Unexpected error count.');
29 Expect.equals(1, collector.warnings.length, 28 Expect.equals(1, collector.warnings.length, 'Unexpected warning count.');
30 'Unexpected warning count.');
31 Expect.equals(MessageKind.ABSTRACT_GETTER, 29 Expect.equals(MessageKind.ABSTRACT_GETTER,
32 collector.warnings.first.messageKind, 30 collector.warnings.first.messageKind, 'Unexpected warning.');
33 'Unexpected warning.');
34 }); 31 });
35 } 32 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/js_throw_behavior_test.dart ('k') | tests/compiler/dart2js/jsinterop/world_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698