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

Side by Side Diff: tests/compiler/dart2js_extra/23432_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // Regression test for http://dartbug.com/23432. Test that the receiver of a 5 // Regression test for http://dartbug.com/23432. Test that the receiver of a
6 // NoSuchMethodError is correct on an intercepted method. The bug (issue 23432) 6 // NoSuchMethodError is correct on an intercepted method. The bug (issue 23432)
7 // is that the interceptor is captured instead of the receiver. 7 // is that the interceptor is captured instead of the receiver.
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 10
11 class N { 11 class N {
12 noSuchMethod(i) { print('x'); return 42; } 12 noSuchMethod(i) {
13 print('x');
14 return 42;
15 }
13 } 16 }
14 17
15 @NoInline() @AssumeDynamic() 18 @NoInline()
19 @AssumeDynamic()
16 get NEVER => false; 20 get NEVER => false;
17 21
18 main() { 22 main() {
19 var c = 12345; 23 var c = 12345;
20 if (NEVER) c = new N(); 24 if (NEVER) c = new N();
21 var e; 25 var e;
22 try { 26 try {
23 c..toString()..add(88); 27 c
28 ..toString()
29 ..add(88);
24 } catch (ex) { 30 } catch (ex) {
25 e = ex; 31 e = ex;
26 } 32 }
27 var s = e.toString(); 33 var s = e.toString();
28 Expect.isTrue(s.contains('$c'), 'Text "$s" should contain "$c"'); 34 Expect.isTrue(s.contains('$c'), 'Text "$s" should contain "$c"');
29 } 35 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/23404_test.dart ('k') | tests/compiler/dart2js_extra/26243_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698