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

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

Issue 831133004: Use closure conversion in new dart2js backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed redundant null-check Created 5 years, 11 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 // 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; 21 import 'js_backend_cps_ir_interceptors.dart' as interceptors;
22 import 'js_backend_cps_ir_closures.dart' as closures;
22 23
23 const String TEST_MAIN_FILE = 'test.dart'; 24 const String TEST_MAIN_FILE = 'test.dart';
24 25
25 List<TestEntry> tests = <TestEntry>[] 26 List<TestEntry> tests = <TestEntry>[]
26 ..addAll(basic.tests) 27 ..addAll(basic.tests)
27 ..addAll(literals.tests) 28 ..addAll(literals.tests)
28 ..addAll(control_flow.tests) 29 ..addAll(control_flow.tests)
29 ..addAll(operators.tests) 30 ..addAll(operators.tests)
30 ..addAll(interceptors.tests); 31 ..addAll(interceptors.tests)
32 ..addAll(closures.tests);
31 33
32 class TestEntry { 34 class TestEntry {
33 final String source; 35 final String source;
34 final String expectation; 36 final String expectation;
35 const TestEntry(this.source, [this.expectation]); 37 const TestEntry(this.source, [this.expectation]);
36 } 38 }
37 39
38 String formatTest(Map test) { 40 String formatTest(Map test) {
39 return test[TEST_MAIN_FILE]; 41 return test[TEST_MAIN_FILE];
40 } 42 }
(...skipping 23 matching lines...) Expand all
64 } 66 }
65 } 67 }
66 }).catchError((e) { 68 }).catchError((e) {
67 print(e); 69 print(e);
68 Expect.fail('The following test failed to compile:\n' 70 Expect.fail('The following test failed to compile:\n'
69 '${formatTest(files)}'); 71 '${formatTest(files)}');
70 }); 72 });
71 }); 73 });
72 } 74 }
73 } 75 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_closures.dart ('k') | tests/language/for_variable_capture_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698