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

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

Issue 1278503004: Revert "Move dart2jslib parts into separate libraries." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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) 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 import 'dart:async';
5 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
6 import 'package:async_helper/async_helper.dart'; 7 import 'package:async_helper/async_helper.dart';
7 import 'compiler_helper.dart'; 8 import 'compiler_helper.dart';
8 9
9 const String TEST = r""" 10 const String TEST = r"""
10 foo(param0, param1, param2) { 11 foo(param0, param1, param2) {
11 if (param0) 12 if (param0)
12 do { 13 do {
13 param1(); 14 param1();
14 } while(param2()); 15 } while(param2());
15 else { 16 else {
16 param2(); 17 param2();
17 } 18 }
18 } 19 }
19 """; 20 """;
20 21
21 main() { 22 main() {
22 print("foo"); 23 print("foo");
23 asyncTest(() => compile(TEST, entry: 'foo', check: (String generated) { 24 asyncTest(() => compile(TEST, entry: 'foo', check: (String generated) {
24 // Check that the do-while in the 'then' is enclosed in braces. 25 // Check that the do-while in the 'then' is enclosed in braces.
25 // Otherwise Android 4.0 stock browser has a syntax error. See issue 10923. 26 // Otherwise Android 4.0 stock browser has a syntax error. See issue 10923.
26 Expect.isTrue( 27 Expect.isTrue(
27 new RegExp(r'if[ ]*\([^)]+\)[ ]*\{[\n ]*do').hasMatch(generated)); 28 new RegExp(r'if[ ]*\([^)]+\)[ ]*\{[\n ]*do').hasMatch(generated));
28 })); 29 }));
29 } 30 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/gvn_dynamic_field_get_test.dart ('k') | tests/compiler/dart2js/issue13354_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698