| OLD | NEW |
| 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 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
| 6 | 6 |
| 7 baz() {} | 7 baz() {} |
| 8 | 8 |
| 9 check_true_true(x, y) { | 9 check_true_true(x, y) { |
| 10 if (x) { | 10 if (x) { |
| 11 if (y) { | 11 if (y) { |
| 12 return true; | 12 return true; |
| 13 } | 13 } |
| 14 } | 14 } |
| 15 baz(); | 15 baz(); |
| 16 return false; | 16 return false; |
| 17 } | 17 } |
| 18 | 18 |
| 19 check_false_true(x, y) { | 19 check_false_true(x, y) { |
| 20 if (x) { | 20 if (x) {} else { |
| 21 | |
| 22 } else { | |
| 23 if (y) { | 21 if (y) { |
| 24 return true; | 22 return true; |
| 25 } | 23 } |
| 26 } | 24 } |
| 27 baz(); | 25 baz(); |
| 28 return false; | 26 return false; |
| 29 } | 27 } |
| 30 | 28 |
| 31 check_true_false(x, y) { | 29 check_true_false(x, y) { |
| 32 if (x) { | 30 if (x) { |
| 33 if (y) { | 31 if (y) {} else { |
| 34 | |
| 35 } else { | |
| 36 return true; | 32 return true; |
| 37 } | 33 } |
| 38 } | 34 } |
| 39 baz(); | 35 baz(); |
| 40 return false; | 36 return false; |
| 41 } | 37 } |
| 42 | 38 |
| 43 check_false_false(x, y) { | 39 check_false_false(x, y) { |
| 44 if (x) { | 40 if (x) {} else { |
| 45 | 41 if (y) {} else { |
| 46 } else { | |
| 47 if (y) { | |
| 48 | |
| 49 } else { | |
| 50 return true; | 42 return true; |
| 51 } | 43 } |
| 52 } | 44 } |
| 53 baz(); | 45 baz(); |
| 54 return false; | 46 return false; |
| 55 } | 47 } |
| 56 | 48 |
| 57 | |
| 58 main() { | 49 main() { |
| 59 Expect.equals(true, check_true_true(true, true)); | 50 Expect.equals(true, check_true_true(true, true)); |
| 60 Expect.equals(false, check_true_true(true, false)); | 51 Expect.equals(false, check_true_true(true, false)); |
| 61 Expect.equals(false, check_true_true(false, true)); | 52 Expect.equals(false, check_true_true(false, true)); |
| 62 Expect.equals(false, check_true_true(false, false)); | 53 Expect.equals(false, check_true_true(false, false)); |
| 63 | 54 |
| 64 Expect.equals(false, check_true_false(true, true)); | 55 Expect.equals(false, check_true_false(true, true)); |
| 65 Expect.equals(true, check_true_false(true, false)); | 56 Expect.equals(true, check_true_false(true, false)); |
| 66 Expect.equals(false, check_true_false(false, true)); | 57 Expect.equals(false, check_true_false(false, true)); |
| 67 Expect.equals(false, check_true_false(false, false)); | 58 Expect.equals(false, check_true_false(false, false)); |
| 68 | 59 |
| 69 Expect.equals(false, check_false_true(true, true)); | 60 Expect.equals(false, check_false_true(true, true)); |
| 70 Expect.equals(false, check_false_true(true, false)); | 61 Expect.equals(false, check_false_true(true, false)); |
| 71 Expect.equals(true, check_false_true(false, true)); | 62 Expect.equals(true, check_false_true(false, true)); |
| 72 Expect.equals(false, check_false_true(false, false)); | 63 Expect.equals(false, check_false_true(false, false)); |
| 73 | 64 |
| 74 Expect.equals(false, check_false_false(true, true)); | 65 Expect.equals(false, check_false_false(true, true)); |
| 75 Expect.equals(false, check_false_false(true, false)); | 66 Expect.equals(false, check_false_false(true, false)); |
| 76 Expect.equals(false, check_false_false(false, true)); | 67 Expect.equals(false, check_false_false(false, true)); |
| 77 Expect.equals(true, check_false_false(false, false)); | 68 Expect.equals(true, check_false_false(false, false)); |
| 78 } | 69 } |
| OLD | NEW |