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

Side by Side Diff: tests/compiler/dart2js/js_backend_cps_ir.dart

Issue 1011403003: cps-ir: Set runtime type information for new objects that require it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add parameter for each type variable to the JS-factory. Created 5 years, 9 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 | Annotate | Revision Log
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 // Test that the CPS IR code generator compiles programs and produces the 5 // Test that the CPS IR code generator compiles programs and produces the
6 // the expected output. 6 // the expected output.
7 7
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import 'package:compiler/src/apiimpl.dart' 10 import 'package:compiler/src/apiimpl.dart'
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 String expectation = test.expectation; 71 String expectation = test.expectation;
72 if (expectation != null) { 72 if (expectation != null) {
73 String expected = test.expectation; 73 String expected = test.expectation;
74 String found = test.elementName == null 74 String found = test.elementName == null
75 ? getCodeForMain(compiler) 75 ? getCodeForMain(compiler)
76 : getCodeForMethod(compiler, test.elementName); 76 : getCodeForMethod(compiler, test.elementName);
77 if (expected != found) { 77 if (expected != found) {
78 Expect.fail('Expected:\n$expected\nbut found\n$found'); 78 Expect.fail('Expected:\n$expected\nbut found\n$found');
79 } 79 }
80 } 80 }
81 }).catchError((e) { 81 }).catchError((e, s) {
82 print(s);
82 print(e); 83 print(e);
83 Expect.fail('The following test failed to compile:\n' 84 Expect.fail('The following test failed to compile:\n'
84 '${formatTest(files)}'); 85 '${formatTest(files)}');
85 }); 86 });
86 }); 87 });
87 } 88 }
88 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698