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

Side by Side Diff: tests/compiler/dart2js/builtin_interceptor_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 'dart:async'; 5 import 'dart:async';
6 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
7 import 'package:async_helper/async_helper.dart'; 7 import 'package:async_helper/async_helper.dart';
8 import 'compiler_helper.dart'; 8 import 'compiler_helper.dart';
9 9
10 const String TEST_ONE = r""" 10 const String TEST_ONE = r"""
11 foo() { 11 foo() {
12 return "foo".length; 12 return "foo".length;
13 } 13 }
14 """; 14 """;
15 15
16 const String TEST_TWO = r""" 16 const String TEST_TWO = r"""
17 foo() { 17 foo() {
18 return r"foo".length; 18 return r"foo".length;
19 } 19 }
20 """; 20 """;
21 21
22 const String TEST_THREE = r""" 22 const String TEST_THREE = r"""
23 foo() { 23 foo() {
24 return new List().add(2); 24 return new List().add(2);
25 } 25 }
26 """; 26 """;
27 27
28 main() { 28 main() {
29 asyncTest(() => Future.wait([ 29 asyncTest(() => Future.wait([
30 compile(TEST_ONE, entry: 'foo', check: (String generated) { 30 compile(TEST_ONE, entry: 'foo', check: (String generated) {
31 Expect.isTrue(generated.contains("return 3;")); 31 Expect.isTrue(generated.contains("return 3;"));
32 }), 32 }),
33 compile(TEST_TWO, entry: 'foo', check: (String generated) { 33 compile(TEST_TWO, entry: 'foo', check: (String generated) {
34 Expect.isTrue(generated.contains("return 3;")); 34 Expect.isTrue(generated.contains("return 3;"));
35 }), 35 }),
36 compile(TEST_THREE, entry: 'foo', check: (String generated) { 36 compile(TEST_THREE, entry: 'foo', check: (String generated) {
37 Expect.isTrue(generated.contains("push(2);")); 37 Expect.isTrue(generated.contains("push(2);"));
38 }), 38 }),
39 ])); 39 ]));
40 } 40 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/builtin_equals_test.dart ('k') | tests/compiler/dart2js/call_site_simple_type_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698