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