| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 code_transformers.test.assets_test; | 5 library code_transformers.test.assets_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:barback/barback.dart'; | 9 import 'package:barback/barback.dart'; |
| 10 import 'package:code_transformers/resolver.dart'; | 10 import 'package:code_transformers/resolver.dart'; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 expectation: false); | 91 expectation: false); |
| 92 }); | 92 }); |
| 93 }); | 93 }); |
| 94 } | 94 } |
| 95 | 95 |
| 96 class Validator extends Transformer { | 96 class Validator extends Transformer { |
| 97 final Function validation; | 97 final Function validation; |
| 98 | 98 |
| 99 Validator(this.validation); | 99 Validator(this.validation); |
| 100 | 100 |
| 101 Future<bool> isPrimary(Asset input) => new Future.value(true); | |
| 102 | |
| 103 Future apply(Transform transform) { | 101 Future apply(Transform transform) { |
| 104 return new Future.value(validation(transform)); | 102 return new Future.value(validation(transform)); |
| 105 } | 103 } |
| 106 } | 104 } |
| OLD | NEW |