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

Unified Diff: utils/tests/pub/lock_file_test.dart

Issue 10850034: Rename BadNumberFormatException -> FormatException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 8 years, 4 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
« no previous file with comments | « utils/pub/version.dart ('k') | utils/tests/pub/pubspec_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/lock_file_test.dart
diff --git a/utils/tests/pub/lock_file_test.dart b/utils/tests/pub/lock_file_test.dart
index f3d489b1e96d1897d1f9151bb64de62fddebc410..72dfe1e346f8ab5c435047c7de508f4f79b131f2 100644
--- a/utils/tests/pub/lock_file_test.dart
+++ b/utils/tests/pub/lock_file_test.dart
@@ -73,18 +73,18 @@ packages:
});
test("throws if the version is missing", () {
- throwsBadFormat(() {
+ expect(() {
new LockFile.parse('''
packages:
foo:
source: mock
description: foo desc
''', sources);
- });
+ }, throwsFormatException);
});
test("throws if the version is invalid", () {
- throwsBadFormat(() {
+ expect(() {
new LockFile.parse('''
packages:
foo:
@@ -92,22 +92,22 @@ packages:
source: mock
description: foo desc
''', sources);
- });
+ }, throwsFormatException);
});
test("throws if the source is missing", () {
- throwsBadFormat(() {
+ expect(() {
new LockFile.parse('''
packages:
foo:
version: 1.2.3
description: foo desc
''', sources);
- });
+ }, throwsFormatException);
});
test("throws if the source is unknown", () {
- throwsBadFormat(() {
+ expect(() {
new LockFile.parse('''
packages:
foo:
@@ -115,22 +115,22 @@ packages:
source: notreal
description: foo desc
''', sources);
- });
+ }, throwsFormatException);
});
test("throws if the description is missing", () {
- throwsBadFormat(() {
+ expect(() {
new LockFile.parse('''
packages:
foo:
version: 1.2.3
source: mock
''', sources);
- });
+ }, throwsFormatException);
});
test("throws if the description is invalid", () {
- throwsBadFormat(() {
+ expect(() {
new LockFile.parse('''
packages:
foo:
@@ -138,11 +138,11 @@ packages:
source: mock
description: foo desc is bad
''', sources);
- });
+ }, throwsFormatException);
});
test("throws if the source name doesn't match the given name", () {
- throwsBadFormat(() {
+ expect(() {
new LockFile.parse('''
packages:
foo:
@@ -150,7 +150,7 @@ packages:
source: mock
description: notfoo desc
''', sources);
- });
+ }, throwsFormatException);
});
test("ignores extra stuff in file", () {
@@ -193,7 +193,3 @@ packages:
});
});
}
-
-throwsBadFormat(function) {
- expect(function, throwsA((e) => e is FormatException));
-}
« no previous file with comments | « utils/pub/version.dart ('k') | utils/tests/pub/pubspec_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698