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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
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
6 class ListLiteral3Test { 8 class ListLiteral3Test {
7 9
8 static const List<String> canonicalJoke = const ["knock", "knock"]; 10 static const List<String> canonicalJoke = const ["knock", "knock"];
9 11
10 static testMain() { 12 static testMain() {
11 13
12 List<String> joke = const ["knock", "knock"]; 14 List<String> joke = const ["knock", "knock"];
13 // Elements of canonical lists are canonicalized. 15 // Elements of canonical lists are canonicalized.
14 Expect.identical(joke, canonicalJoke); 16 Expect.identical(joke, canonicalJoke);
15 Expect.identical(joke[0], joke[1]); 17 Expect.identical(joke[0], joke[1]);
(...skipping 22 matching lines...) Expand all
38 Expect.identical(b[0], b[1]); 40 Expect.identical(b[0], b[1]);
39 Expect.equals(true, b[0][0] == 1.0); 41 Expect.equals(true, b[0][0] == 1.0);
40 Expect.identical(b[0][0], b[1][0]); 42 Expect.identical(b[0][0], b[1][0]);
41 Expect.throws(() { b[0][0] = 42.0; }, (e) => e is UnsupportedError); 43 Expect.throws(() { b[0][0] = 42.0; }, (e) => e is UnsupportedError);
42 } 44 }
43 } 45 }
44 46
45 main() { 47 main() {
46 ListLiteral3Test.testMain(); 48 ListLiteral3Test.testMain();
47 } 49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698