OLD | NEW |
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'; | |
9 import 'dart:convert' show Encoding; | 8 import 'dart:convert' show Encoding; |
10 | 9 |
11 import 'package:barback/barback.dart'; | 10 import 'package:barback/barback.dart'; |
12 import 'package:barback/src/cancelable_future.dart'; | 11 import 'package:barback/src/cancelable_future.dart'; |
13 import 'package:barback/src/utils.dart'; | 12 import 'package:barback/src/utils.dart'; |
14 import 'package:path/path.dart' as pathos; | 13 import 'package:path/path.dart' as pathos; |
15 import 'package:scheduled_test/scheduled_test.dart'; | 14 import 'package:scheduled_test/scheduled_test.dart'; |
16 import 'package:stack_trace/stack_trace.dart'; | 15 import 'package:stack_trace/stack_trace.dart'; |
17 import 'package:unittest/compact_vm_config.dart'; | 16 import 'package:unittest/compact_vm_config.dart'; |
18 | 17 |
(...skipping 10 matching lines...) Expand all Loading... |
29 export 'transformer/emit_nothing.dart'; | 28 export 'transformer/emit_nothing.dart'; |
30 export 'transformer/has_input.dart'; | 29 export 'transformer/has_input.dart'; |
31 export 'transformer/lazy_assets.dart'; | 30 export 'transformer/lazy_assets.dart'; |
32 export 'transformer/lazy_bad.dart'; | 31 export 'transformer/lazy_bad.dart'; |
33 export 'transformer/lazy_many_to_one.dart'; | 32 export 'transformer/lazy_many_to_one.dart'; |
34 export 'transformer/lazy_rewrite.dart'; | 33 export 'transformer/lazy_rewrite.dart'; |
35 export 'transformer/many_to_one.dart'; | 34 export 'transformer/many_to_one.dart'; |
36 export 'transformer/mock.dart'; | 35 export 'transformer/mock.dart'; |
37 export 'transformer/one_to_many.dart'; | 36 export 'transformer/one_to_many.dart'; |
38 export 'transformer/rewrite.dart'; | 37 export 'transformer/rewrite.dart'; |
| 38 export 'transformer/sync_rewrite.dart'; |
39 | 39 |
40 var _configured = false; | 40 var _configured = false; |
41 | 41 |
42 MockProvider _provider; | 42 MockProvider _provider; |
43 Barback _barback; | 43 Barback _barback; |
44 | 44 |
45 /// Calls to [buildShouldSucceed] and [buildShouldFail] set expectations on | 45 /// Calls to [buildShouldSucceed] and [buildShouldFail] set expectations on |
46 /// successive [BuildResult]s from [_barback]. This keeps track of how many | 46 /// successive [BuildResult]s from [_barback]. This keeps track of how many |
47 /// calls have already been made so later calls know which result to look for. | 47 /// calls have already been made so later calls know which result to look for. |
48 int _nextBuildResult; | 48 int _nextBuildResult; |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 | 580 |
581 _MockAsset(this.id, this.contents); | 581 _MockAsset(this.id, this.contents); |
582 | 582 |
583 Future<String> readAsString({Encoding encoding}) => | 583 Future<String> readAsString({Encoding encoding}) => |
584 new Future.value(contents); | 584 new Future.value(contents); |
585 | 585 |
586 Stream<List<int>> read() => throw new UnimplementedError(); | 586 Stream<List<int>> read() => throw new UnimplementedError(); |
587 | 587 |
588 String toString() => "MockAsset $id $contents"; | 588 String toString() => "MockAsset $id $contents"; |
589 } | 589 } |
OLD | NEW |