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

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

Issue 10891020: Update almost all tests (except co19) to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 8 years, 3 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/corelib/list_iterators_test.dart ('k') | tests/corelib/queue_iterator_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 4
5 class ListTest { 5 class ListTest {
6 6
7 static testMain() { 7 static testMain() {
8 testList(); 8 testList();
9 testExpandableList(); 9 testExpandableList();
10 } 10 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 Expect.equals(3, list.lastIndexOf(100)); 83 Expect.equals(3, list.lastIndexOf(100));
84 list[3] = 3; 84 list[3] = 3;
85 Expect.equals(-1, list.indexOf(100)); 85 Expect.equals(-1, list.indexOf(100));
86 Expect.equals(-1, list.lastIndexOf(100)); 86 Expect.equals(-1, list.lastIndexOf(100));
87 87
88 testClosures(list); 88 testClosures(list);
89 89
90 var exception = null; 90 var exception = null;
91 try { 91 try {
92 list.clear(); 92 list.clear();
93 } catch (UnsupportedOperationException e) { 93 } on UnsupportedOperationException catch (e) {
94 exception = e; 94 exception = e;
95 } 95 }
96 Expect.equals(true, exception != null); 96 Expect.equals(true, exception != null);
97 } 97 }
98 98
99 static void testExpandableList() { 99 static void testExpandableList() {
100 List list = new List(); 100 List list = new List();
101 Expect.equals(true, list.isEmpty()); 101 Expect.equals(true, list.isEmpty());
102 Expect.equals(list.length, 0); 102 Expect.equals(list.length, 0);
103 list.add(4); 103 list.add(4);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 } 144 }
145 145
146 class Yes { 146 class Yes {
147 operator ==(var other) => true; 147 operator ==(var other) => true;
148 } 148 }
149 149
150 main() { 150 main() {
151 ListTest.testMain(); 151 ListTest.testMain();
152 } 152 }
OLDNEW
« no previous file with comments | « tests/corelib/list_iterators_test.dart ('k') | tests/corelib/queue_iterator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698