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

Side by Side Diff: tests/language/strict_equal_test.dart

Issue 10977021: Fix incorrect strict not-equal comparison when both arguments are constants. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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.cc ('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 5
6 main() { 6 main() {
7 for (int i = 0; i < 6000; i++) { 7 for (int i = 0; i < 6000; i++) {
8 Expect.isFalse(test1(5)); 8 Expect.isFalse(test1(5));
9 Expect.isTrue(test1(3)); 9 Expect.isTrue(test1(3));
10 10
11 Expect.isTrue(test2(5)); 11 Expect.isTrue(test2(5));
12 Expect.isFalse(test2(3)); 12 Expect.isFalse(test2(3));
13 13
14 Expect.isTrue(test2r(5)); 14 Expect.isTrue(test2r(5));
15 Expect.isFalse(test2r(3)); 15 Expect.isFalse(test2r(3));
16 16
17 Expect.isTrue(test3()); 17 Expect.isTrue(test3());
18 18
19 Expect.equals(2, test4(5)); 19 Expect.equals(2, test4(5));
20 Expect.equals(1, test4(3)); 20 Expect.equals(1, test4(3));
21 21
22 Expect.equals(1, test5(5)); 22 Expect.equals(1, test5(5));
23 Expect.equals(2, test5(3)); 23 Expect.equals(2, test5(3));
24 24
25 Expect.equals(1, test6()); 25 Expect.equals(1, test6());
26
27 Expect.isFalse(test7());
28 Expect.equals(2, test8());
26 } 29 }
27 } 30 }
28 31
29 32
30 test1(a) { 33 test1(a) {
31 return a === 3; 34 return a === 3;
32 } 35 }
33 36
34 test2(a) { 37 test2(a) {
35 return a !== 3; 38 return a !== 3;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (get5() === 5) { 71 if (get5() === 5) {
69 return 1; 72 return 1;
70 } else { 73 } else {
71 return 2; 74 return 2;
72 } 75 }
73 } 76 }
74 77
75 get5() { 78 get5() {
76 return 5; 79 return 5;
77 } 80 }
81
82 test7() {
83 return null !== null;
84 }
85
86
87 test8() {
88 if (null !== null) {
89 return 1;
90 } else {
91 return 2;
92 }
93 }
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698