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