Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 library barback.test.asset_id_test; | |
| 5 | |
| 6 import 'dart:async'; | |
| 7 | |
| 8 import 'package:barback/barback.dart'; | |
| 9 import 'package:unittest/unittest.dart'; | |
| 10 | |
| 11 import 'utils.dart'; | |
| 12 | |
| 13 main() { | |
| 14 initConfig(); | |
| 15 group("parse", () { | |
| 16 test("parses the package and path", () { | |
| 17 var id = new AssetId.parse("package|path/to/asset.txt"); | |
| 18 expect(id.package, equals("package")); | |
| 19 expect(id.path, equals("path/to/asset.txt")); | |
| 20 }); | |
| 21 | |
| 22 test("throws if there are multiple '|'", () { | |
| 23 expect(() => new AssetId.parse("app|path|wtf"), throwsFormatException); | |
| 24 }); | |
| 25 }); | |
|
nweiz
2013/06/18 23:14:46
Other edge cases: empty package string, empty path
Bob Nystrom
2013/06/20 00:23:59
Done.
| |
| 26 } | |
| OLD | NEW |