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

Side by Side Diff: tests/compiler/dart2js_extra/21666_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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
6 // Regression test for issue 21666 - problems with method that has super calls. 5 // Regression test for issue 21666 - problems with method that has super calls.
7 // 6 //
8 // Use a method and getter with super calls in various ways. 7 // Use a method and getter with super calls in various ways.
9 8
10 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
11 10
12 @MirrorsUsed(targets: const [A, B, Object]) 11 @MirrorsUsed(targets: const [A, B, Object])
13 import 'dart:mirrors'; 12 import 'dart:mirrors';
14 13
15 class X { const X(); } 14 class X {
16 class Y { const Y(); } 15 const X();
16 }
17
18 class Y {
19 const Y();
20 }
17 21
18 typedef fInt(int x); 22 typedef fInt(int x);
19 typedef fString(String x); 23 typedef fString(String x);
20 24
21 class A { 25 class A {
22 @X() 26 @X()
23 foo(int x) => x + 1; 27 foo(int x) => x + 1;
24 int get bar => A.g; 28 int get bar => A.g;
25 29
26 static int g = 0; 30 static int g = 0;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 var bgbar = bm.getField(#bar); 81 var bgbar = bm.getField(#bar);
78 82
79 Expect.equals(300, bgfoo.reflectee(2)); 83 Expect.equals(300, bgfoo.reflectee(2));
80 Expect.equals(400, bm.invoke(#foo, [3]).reflectee); 84 Expect.equals(400, bm.invoke(#foo, [3]).reflectee);
81 Expect.equals(123000, bgbar.reflectee); 85 Expect.equals(123000, bgbar.reflectee);
82 Expect.isTrue(b.foo is fInt); 86 Expect.isTrue(b.foo is fInt);
83 Expect.isTrue(b.foo is! fString); 87 Expect.isTrue(b.foo is! fString);
84 Expect.isTrue(bgfoo.reflectee is fInt); 88 Expect.isTrue(bgfoo.reflectee is fInt);
85 Expect.isTrue(bgfoo.reflectee is! fString); 89 Expect.isTrue(bgfoo.reflectee is! fString);
86 } 90 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/21351_test.dart ('k') | tests/compiler/dart2js_extra/21724_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698