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

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

Issue 81363002: Improve type test and type equality for generics (issue 15148). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/raw_object.h ('k') | tests/language/language.status » ('j') | 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 class ConstListTest { 7 class ConstListTest {
8 8
9 static testMain() { 9 static testMain() {
10 List fixedList = new List(4); 10 List fixedList = new List(4);
(...skipping 16 matching lines...) Expand all
27 Expect.equals(4, growableList.removeLast()); 27 Expect.equals(4, growableList.removeLast());
28 Expect.equals(false, fixedList == growableList); 28 Expect.equals(false, fixedList == growableList);
29 fixedList[3] = 0; 29 fixedList[3] = 0;
30 Expect.equals(false, fixedList == growableList); 30 Expect.equals(false, fixedList == growableList);
31 var a = [1, 2, 3.1]; 31 var a = [1, 2, 3.1];
32 var b = [1, 2, 3.1]; 32 var b = [1, 2, 3.1];
33 Expect.equals(false, a == b); 33 Expect.equals(false, a == b);
34 a = const [1, 2, 3.1]; 34 a = const [1, 2, 3.1];
35 b = const [1, 2, 3.1]; 35 b = const [1, 2, 3.1];
36 Expect.equals(true, a == b); 36 Expect.equals(true, a == b);
37 a = const <num>[1, 2, 3.1];
38 b = const [1, 2, 3.1];
39 Expect.equals(false, a == b);
40 a = const <dynamic>[1, 2, 3.1];
41 b = const [1, 2, 3.1];
42 Expect.equals(true, a == b);
37 } 43 }
38 } 44 }
39 45
40 main() { 46 main() {
41 ConstListTest.testMain(); 47 ConstListTest.testMain();
42 } 48 }
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698