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

Side by Side Diff: tests/compiler/dart2js_extra/mirrors_used_metatargets_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 @MirrorsUsed(metaTargets: 'X') 5 @MirrorsUsed(metaTargets: 'X')
6 import 'dart:mirrors'; 6 import 'dart:mirrors';
7 7
8 const x = const X(); 8 const x = const X();
9
9 class X { 10 class X {
10 const X(); 11 const X();
11 } 12 }
12 13
13 @x 14 @x
14 class Y { 15 class Y {
15 foo() => 42; 16 foo() => 42;
16 } 17 }
17 18
18 class Z { 19 class Z {
(...skipping 11 matching lines...) Expand all
30 if (reflect(z).invoke(#bar, []).reflectee != 87) throw 'Wrong Z.bar'; 31 if (reflect(z).invoke(#bar, []).reflectee != 87) throw 'Wrong Z.bar';
31 32
32 bool caught = false; 33 bool caught = false;
33 try { 34 try {
34 reflect(z).invoke(#foo, []); 35 reflect(z).invoke(#foo, []);
35 } on UnsupportedError catch (e) { 36 } on UnsupportedError catch (e) {
36 caught = true; 37 caught = true;
37 } 38 }
38 if (!caught) throw 'Wrong Z.foo'; 39 if (!caught) throw 'Wrong Z.foo';
39 } 40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698