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

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

Issue 1562023002: Add test of unittests. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments Created 4 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
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 // Test that the GVN optimization pass works as expected. 5 // Test that the GVN optimization pass works as expected.
6 6
7 library basic_tests; 7 library gvn_tests;
8 8
9 import 'js_backend_cps_ir.dart'; 9 import 'js_backend_cps_ir.dart';
10 10
11 const List<TestEntry> tests = const [ 11 const List<TestEntry> tests = const [
12 const TestEntry(r""" 12 const TestEntry(r"""
13 foo(x, list) { 13 foo(x, list) {
14 var sum = 0; 14 var sum = 0;
15 for (int k = 0; k < 10; k++) { 15 for (int k = 0; k < 10; k++) {
16 // Everything can be hoisted out up to the index access which is 16 // Everything can be hoisted out up to the index access which is
17 // blocked by the bounds check. 17 // blocked by the bounds check.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (!(typeof print == "function")) 68 if (!(typeof print == "function"))
69 throw "Unable to print message: " + String(v0); 69 throw "Unable to print message: " + String(v0);
70 print(v0); 70 print(v0);
71 } 71 }
72 }"""), 72 }"""),
73 ]; 73 ];
74 74
75 void main() { 75 void main() {
76 runTests(tests); 76 runTests(tests);
77 } 77 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698