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

Side by Side Diff: tests/html/element_classes_test.dart

Issue 12463033: Fix test after Set-change. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | no next file » | 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 library ElementTest; 5 library ElementTest;
6 import '../../pkg/unittest/lib/unittest.dart'; 6 import '../../pkg/unittest/lib/unittest.dart';
7 import '../../pkg/unittest/lib/html_config.dart'; 7 import '../../pkg/unittest/lib/html_config.dart';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:html'; 9 import 'dart:html';
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 }); 137 });
138 138
139 test('removeAll', () { 139 test('removeAll', () {
140 final classes = makeClassSet(); 140 final classes = makeClassSet();
141 classes.removeAll(['bar', 'baz', 'qux']); 141 classes.removeAll(['bar', 'baz', 'qux']);
142 expect(classes, orderedEquals(['foo'])); 142 expect(classes, orderedEquals(['foo']));
143 }); 143 });
144 144
145 test('isSubsetOf', () { 145 test('isSubsetOf', () {
146 final classes = makeClassSet(); 146 final classes = makeClassSet();
147 expect(classes.isSubsetOf(['foo', 'bar', 'baz']), isTrue); 147 expect(classes.isSubsetOf(['foo', 'bar', 'baz'].toSet()), isTrue);
148 expect(classes.isSubsetOf(['foo', 'bar', 'baz', 'qux']), isTrue); 148 expect(classes.isSubsetOf(['foo', 'bar', 'baz', 'qux'].toSet()), isTrue);
149 expect(classes.isSubsetOf(['foo', 'bar', 'qux']), isFalse); 149 expect(classes.isSubsetOf(['foo', 'bar', 'qux'].toSet()), isFalse);
150 }); 150 });
151 151
152 test('containsAll', () { 152 test('containsAll', () {
153 final classes = makeClassSet(); 153 final classes = makeClassSet();
154 expect(classes.containsAll(['foo', 'baz']), isTrue); 154 expect(classes.containsAll(['foo', 'baz'].toSet()), isTrue);
155 expect(classes.containsAll(['foo', 'qux']), isFalse); 155 expect(classes.containsAll(['foo', 'qux'].toSet()), isFalse);
156 }); 156 });
157 157
158 test('intersection', () { 158 test('intersection', () {
159 final classes = makeClassSet(); 159 final classes = makeClassSet();
160 expect(classes.intersection(['foo', 'qux', 'baz']), 160 expect(classes.intersection(['foo', 'qux', 'baz'].toSet()),
161 unorderedEquals(['foo', 'baz'])); 161 unorderedEquals(['foo', 'baz']));
162 }); 162 });
163 163
164 test('clear', () { 164 test('clear', () {
165 final classes = makeClassSet(); 165 final classes = makeClassSet();
166 classes.clear(); 166 classes.clear();
167 expect(classes, equals([])); 167 expect(classes, equals([]));
168 }); 168 });
169 169
170 test('order', () { 170 test('order', () {
171 var classes = makeClassSet(); 171 var classes = makeClassSet();
172 classes.add('aardvark'); 172 classes.add('aardvark');
173 expect(classes, orderedEquals(['foo', 'bar', 'baz', 'aardvark'])); 173 expect(classes, orderedEquals(['foo', 'bar', 'baz', 'aardvark']));
174 classes.toggle('baz'); 174 classes.toggle('baz');
175 expect(classes, orderedEquals(['foo', 'bar', 'aardvark'])); 175 expect(classes, orderedEquals(['foo', 'bar', 'aardvark']));
176 classes.toggle('baz'); 176 classes.toggle('baz');
177 expect(classes, orderedEquals(['foo', 'bar', 'aardvark', 'baz'])); 177 expect(classes, orderedEquals(['foo', 'bar', 'aardvark', 'baz']));
178 }); 178 });
179 } 179 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698