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

Side by Side Diff: pkg/barback/test/asset_set_test.dart

Issue 267393009: Transition barback's infrastructure to an aggregate-based model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 7 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 library barback.test.asset_set_test; 5 library barback.test.asset_set_test;
6 6
7 import 'package:barback/barback.dart'; 7 import 'package:barback/barback.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 9
10 import 'utils.dart'; 10 import 'utils.dart';
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 }); 139 });
140 140
141 test("returns null when removing an asset not in the set", () { 141 test("returns null when removing an asset not in the set", () {
142 var set = new AssetSet(); 142 var set = new AssetSet();
143 var foo = new Asset.fromString(fooId, "foo"); 143 var foo = new Asset.fromString(fooId, "foo");
144 set.add(foo); 144 set.add(foo);
145 145
146 expect(set.removeId(barId), isNull); 146 expect(set.removeId(barId), isNull);
147 }); 147 });
148 }); 148 });
149
150 group(".ids", () {
151 test("contains the ids of all the assets in the set", () {
152 var set = new AssetSet();
153 var foo = new Asset.fromString(fooId, "foo");
154 var bar = new Asset.fromString(barId, "bar");
155 set.addAll([foo, bar]);
156 expect(set.ids, unorderedEquals([fooId, barId]));
157 });
158 });
149 } 159 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698