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

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

Issue 29463002: fix for Set.add tweak in r28863 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes for bool return value Created 7 years, 2 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 | pkg/unmodifiable_collection/lib/unmodifiable_collection.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) 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.utils; 5 library barback.test.utils;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert' show Encoding; 9 import 'dart:convert' show Encoding;
10 10
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 _assets = {"app": new AssetSet()}; 462 _assets = {"app": new AssetSet()};
463 } 463 }
464 } 464 }
465 465
466 void _modifyAsset(String name, String contents) { 466 void _modifyAsset(String name, String contents) {
467 var id = new AssetId.parse(name); 467 var id = new AssetId.parse(name);
468 _errors.remove(id); 468 _errors.remove(id);
469 _assets[id.package][id].contents = contents; 469 _assets[id.package][id].contents = contents;
470 } 470 }
471 471
472 void _setAssetError(String name) => _errors.add(new AssetId.parse(name)); 472 void _setAssetError(String name) {
473 _errors.add(new AssetId.parse(name));
474 }
473 475
474 List<AssetId> listAssets(String package, {String within}) { 476 List<AssetId> listAssets(String package, {String within}) {
475 if (within != null) { 477 if (within != null) {
476 throw new UnimplementedError("Doesn't handle 'within' yet."); 478 throw new UnimplementedError("Doesn't handle 'within' yet.");
477 } 479 }
478 480
479 return _assets[package].map((asset) => asset.id); 481 return _assets[package].map((asset) => asset.id);
480 } 482 }
481 483
482 Future<Asset> getAsset(AssetId id) { 484 Future<Asset> getAsset(AssetId id) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 521
520 _MockAsset(this.id, this.contents); 522 _MockAsset(this.id, this.contents);
521 523
522 Future<String> readAsString({Encoding encoding}) => 524 Future<String> readAsString({Encoding encoding}) =>
523 new Future.value(contents); 525 new Future.value(contents);
524 526
525 Stream<List<int>> read() => throw new UnimplementedError(); 527 Stream<List<int>> read() => throw new UnimplementedError();
526 528
527 String toString() => "MockAsset $id $contents"; 529 String toString() => "MockAsset $id $contents";
528 } 530 }
OLDNEW
« no previous file with comments | « no previous file | pkg/unmodifiable_collection/lib/unmodifiable_collection.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698