| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Dart test program for testing basic boolean properties. | 5 // Dart test program for testing basic boolean properties. |
| 6 // @static-clean | 6 // @static-clean |
| 7 | 7 |
| 8 class BoolTest { | 8 class BoolTest { |
| 9 static void testEquality() { | 9 static void testEquality() { |
| 10 Expect.equals(true, true); | 10 Expect.equals(true, true); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 if (false !== false) { | 98 if (false !== false) { |
| 99 throw "Expect.equals broken"; | 99 throw "Expect.equals broken"; |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 | 102 |
| 103 static void testToString() { | 103 static void testToString() { |
| 104 Expect.equals("true", true.toString()); | 104 Expect.equals("true", true.toString()); |
| 105 Expect.equals("false", false.toString()); | 105 Expect.equals("false", false.toString()); |
| 106 } | 106 } |
| 107 | 107 |
| 108 static void testNegate(isTrue, isFalse) { |
| 109 Expect.equals(true, !false); |
| 110 Expect.equals(false, !true); |
| 111 Expect.equals(true, !isFalse); |
| 112 Expect.equals(false, !isTrue); |
| 113 } |
| 114 |
| 108 static void testMain() { | 115 static void testMain() { |
| 109 testEquality(); | 116 testEquality(); |
| 117 testNegate(true, false); |
| 110 testToString(); | 118 testToString(); |
| 111 } | 119 } |
| 112 } | 120 } |
| 113 | 121 |
| 114 main() { | 122 main() { |
| 115 BoolTest.testMain(); | 123 BoolTest.testMain(); |
| 116 } | 124 } |
| OLD | NEW |