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

Unified 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: Revise. 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 side-by-side diff with in-line comments
Download patch
Index: pkg/barback/test/asset_id_test.dart
diff --git a/pkg/barback/test/asset_id_test.dart b/pkg/barback/test/asset_id_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..e30b20a5861782ecace5f75bb8e2867229ec475a
--- /dev/null
+++ b/pkg/barback/test/asset_id_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+library barback.test.asset_id_test;
+
+import 'dart:async';
+
+import 'package:barback/barback.dart';
+import 'package:unittest/unittest.dart';
+
+import 'utils.dart';
+
+main() {
+ initConfig();
+ group("parse", () {
+ test("parses the package and path", () {
+ var id = new AssetId.parse("package|path/to/asset.txt");
+ expect(id.package, equals("package"));
+ expect(id.path, equals("path/to/asset.txt"));
+ });
+
+ test("throws if there are multiple '|'", () {
+ expect(() => new AssetId.parse("app|path|wtf"), throwsFormatException);
+ });
+ });
nweiz 2013/06/18 23:14:46 Other edge cases: empty package string, empty path
Bob Nystrom 2013/06/20 00:23:59 Done.
+}

Powered by Google App Engine
This is Rietveld 408576698