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

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

Issue 16854005: First pass at build dependency graph for barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle unprovided sources and errors a bit better. Created 7 years, 6 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 | « pkg/barback/test/asset_graph/transform_test.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
5 library barback.test.asset_id_test;
6
7 import 'dart:async';
8
9 import 'package:barback/barback.dart';
10 import 'package:unittest/unittest.dart';
11
12 import 'utils.dart';
13
14 main() {
15 initConfig();
16 group("parse", () {
17 test("parses the package and path", () {
18 var id = new AssetId.parse("package|path/to/asset.txt");
19 expect(id.package, equals("package"));
20 expect(id.path, equals("path/to/asset.txt"));
21 });
22
23 test("throws if there are multiple '|'", () {
24 expect(() => new AssetId.parse("app|path|wtf"), throwsFormatException);
25 });
26
27 test("throws if the package name is empty '|'", () {
28 expect(() => new AssetId.parse("|asset.txt"), throwsFormatException);
29 });
30
31 test("throws if the path is empty '|'", () {
32 expect(() => new AssetId.parse("app|"), throwsFormatException);
33 });
34 });
35 }
OLDNEW
« no previous file with comments | « pkg/barback/test/asset_graph/transform_test.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698