| 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.transformer.bad; |
| 6 |
| 5 import 'dart:async'; | 7 import 'dart:async'; |
| 6 | 8 |
| 7 import 'package:barback/barback.dart'; | 9 import 'package:barback/barback.dart'; |
| 8 import 'package:barback/src/utils.dart'; | 10 import 'package:barback/src/utils.dart'; |
| 9 | 11 |
| 10 import 'mock.dart'; | 12 import 'mock.dart'; |
| 11 | 13 |
| 12 /// A transformer that throws an exception when run, after generating the | 14 /// A transformer that throws an exception when run, after generating the |
| 13 /// given outputs. | 15 /// given outputs. |
| 14 class BadTransformer extends MockTransformer { | 16 class BadTransformer extends MockTransformer { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 28 for (var output in outputs) { | 30 for (var output in outputs) { |
| 29 var id = new AssetId.parse(output); | 31 var id = new AssetId.parse(output); |
| 30 transform.addOutput(new Asset.fromString(id, output)); | 32 transform.addOutput(new Asset.fromString(id, output)); |
| 31 } | 33 } |
| 32 | 34 |
| 33 // Then fail. | 35 // Then fail. |
| 34 throw ERROR; | 36 throw ERROR; |
| 35 }); | 37 }); |
| 36 } | 38 } |
| 37 } | 39 } |
| OLD | NEW |