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

Side by Side Diff: tests/corelib/list_insert_test.dart

Issue 13724021: Remove deprecated Expect from the libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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';
6
5 void main() { 7 void main() {
6 // Normal modifiable list. 8 // Normal modifiable list.
7 var l1 = [0, 1, 2, 3, 4]; 9 var l1 = [0, 1, 2, 3, 4];
8 10
9 bool checkedMode = false; 11 bool checkedMode = false;
10 assert(checkedMode = true); 12 assert(checkedMode = true);
11 13
12 // Index must be integer and in range. 14 // Index must be integer and in range.
13 Expect.throws(() { l1.insert(-1, 5); }, 15 Expect.throws(() { l1.insert(-1, 5); },
14 (e) => e is RangeError, 16 (e) => e is RangeError,
(...skipping 27 matching lines...) Expand all
42 Expect.throws(() { l3.insert(2, 5); }, 44 Expect.throws(() { l3.insert(2, 5); },
43 (e) => e is UnsupportedError, 45 (e) => e is UnsupportedError,
44 "unmodifiable"); 46 "unmodifiable");
45 47
46 // Empty list is not special. 48 // Empty list is not special.
47 var l4 = []; 49 var l4 = [];
48 l4.insert(0, 499); 50 l4.insert(0, 499);
49 Expect.equals(1, l4.length); 51 Expect.equals(1, l4.length);
50 Expect.equals(499, l4[0]); 52 Expect.equals(499, l4[0]);
51 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698