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

Side by Side Diff: tests/language/rewrite_if_swap_test.dart

Issue 288343014: dart2dart: Test cases for better code coverage in dart_tree rewritings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "package:expect/expect.dart";
6
7 var global = 0;
8
9 bar() {
10 global += 1;
11 }
12 baz() {
13 global += 100;
14 }
15
16 foo(b) {
17 var old_backend_was_used;
18 if (b ? false : true) {
19 bar();
20 bar();
21 } else {
22 baz();
23 baz();
24 }
25 }
26
27 main() {
28 foo(true);
29 Expect.equals(2, global);
30
31 foo(false);
32 Expect.equals(202, global);
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698