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

Side by Side Diff: tests/language/src/BoolTest.dart

Issue 9615025: Implement '==', '!=' and instanceof (without code generation). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.h ('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
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
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 }
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698