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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 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 | « tests/language/list_literal2_test.dart ('k') | tests/language/list_literal4_test.dart » ('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 // Check that arrays from const array literals are immutable. 4 // Check that arrays from const array literals are immutable.
5 5
6 import "package:expect/expect.dart";
7
8 class ListLiteral3Test { 6 class ListLiteral3Test {
9 7
10 static const List<String> canonicalJoke = const ["knock", "knock"]; 8 static const List<String> canonicalJoke = const ["knock", "knock"];
11 9
12 static testMain() { 10 static testMain() {
13 11
14 List<String> joke = const ["knock", "knock"]; 12 List<String> joke = const ["knock", "knock"];
15 // Elements of canonical lists are canonicalized. 13 // Elements of canonical lists are canonicalized.
16 Expect.identical(joke, canonicalJoke); 14 Expect.identical(joke, canonicalJoke);
17 Expect.identical(joke[0], joke[1]); 15 Expect.identical(joke[0], joke[1]);
(...skipping 22 matching lines...) Expand all
40 Expect.identical(b[0], b[1]); 38 Expect.identical(b[0], b[1]);
41 Expect.equals(true, b[0][0] == 1.0); 39 Expect.equals(true, b[0][0] == 1.0);
42 Expect.identical(b[0][0], b[1][0]); 40 Expect.identical(b[0][0], b[1][0]);
43 Expect.throws(() { b[0][0] = 42.0; }, (e) => e is UnsupportedError); 41 Expect.throws(() { b[0][0] = 42.0; }, (e) => e is UnsupportedError);
44 } 42 }
45 } 43 }
46 44
47 main() { 45 main() {
48 ListLiteral3Test.testMain(); 46 ListLiteral3Test.testMain();
49 } 47 }
OLDNEW
« no previous file with comments | « tests/language/list_literal2_test.dart ('k') | tests/language/list_literal4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698