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

Side by Side Diff: tests/compiler/dart2js/kernel/control_flow_test.dart

Issue 2301293002: kernel -> ssa: implement if-statements (Closed)
Patch Set: add visitNot Created 4 years, 3 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
« no previous file with comments | « tests/compiler/dart2js/dart2js.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, 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:test/test.dart';
6
7 import 'helper.dart' show check;
8
9 main() {
10 group('compile control flow', () {
11 test('simple if statement', () {
12 String code = '''
13 main() {
14 if (true) {
15 return 1;
16 } else {
17 return 2;
18 }
19 }''';
20 return check(code);
21 });
22 test('simple if statement no else', () {
23 String code = '''
24 main() {
25 if (true) {
26 return 1;
27 }
28 }''';
29 return check(code);
30 });
31 test('simple dead if statement', () {
32 String code = '''
33 main() {
34 if (false) {
35 return 1;
36 }
37 }''';
38 return check(code);
39 });
40 });
41 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698