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

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

Issue 806103003: cps-ir: Add support for intercepted calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Disable debug print. Created 6 years 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 // VMOptions=-DUSE_CPS_IR=true 4 // VMOptions=-DUSE_CPS_IR=true
5 5
6 // Test that the CPS IR code generator compiles programs and produces the 6 // Test that the CPS IR code generator compiles programs and produces the
7 // the expected output. 7 // the expected output.
8 8
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
11 import 'package:compiler/src/apiimpl.dart' 11 import 'package:compiler/src/apiimpl.dart'
12 show Compiler; 12 show Compiler;
13 import 'memory_compiler.dart'; 13 import 'memory_compiler.dart';
14 import 'package:compiler/src/js/js.dart' as js; 14 import 'package:compiler/src/js/js.dart' as js;
15 import 'package:compiler/src/common.dart' show Element; 15 import 'package:compiler/src/common.dart' show Element;
16 16
17 import 'js_backend_cps_ir_basic.dart' as basic; 17 import 'js_backend_cps_ir_basic.dart' as basic;
18 import 'js_backend_cps_ir_literals.dart' as literals; 18 import 'js_backend_cps_ir_literals.dart' as literals;
19 import 'js_backend_cps_ir_operators.dart' as operators; 19 import 'js_backend_cps_ir_operators.dart' as operators;
20 import 'js_backend_cps_ir_control_flow.dart' as control_flow; 20 import 'js_backend_cps_ir_control_flow.dart' as control_flow;
21 import 'js_backend_cps_ir_interceptors.dart' as interceptors;
sigurdm 2014/12/16 11:44:56 I think you forgot to add this test
karlklose 2014/12/16 12:04:03 Done.
21 22
22 const String TEST_MAIN_FILE = 'test.dart'; 23 const String TEST_MAIN_FILE = 'test.dart';
23 24
24 List<TestEntry> tests = <TestEntry>[] 25 List<TestEntry> tests = <TestEntry>[]
25 ..addAll(basic.tests) 26 ..addAll(basic.tests)
26 ..addAll(literals.tests) 27 ..addAll(literals.tests)
27 ..addAll(control_flow.tests) 28 ..addAll(control_flow.tests)
28 ..addAll(operators.tests); 29 ..addAll(operators.tests)
30 ..addAll(interceptors.tests);
29 31
30 class TestEntry { 32 class TestEntry {
31 final String source; 33 final String source;
32 final String expectation; 34 final String expectation;
33 const TestEntry(this.source, [this.expectation]); 35 const TestEntry(this.source, [this.expectation]);
34 } 36 }
35 37
36 String formatTest(Map test) { 38 String formatTest(Map test) {
37 return test[TEST_MAIN_FILE]; 39 return test[TEST_MAIN_FILE];
38 } 40 }
(...skipping 23 matching lines...) Expand all
62 } 64 }
63 } 65 }
64 }).catchError((e) { 66 }).catchError((e) {
65 print(e); 67 print(e);
66 Expect.fail('The following test failed to compile:\n' 68 Expect.fail('The following test failed to compile:\n'
67 '${formatTest(files)}'); 69 '${formatTest(files)}');
68 }); 70 });
69 }); 71 });
70 } 72 }
71 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698