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

Unified Diff: tests/corelib/reg_exp4_test.dart

Issue 11417058: Revert "Remove NullPointerException." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « tests/corelib/null_nosuchmethod_test.dart ('k') | tests/corelib/reg_exp5_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/reg_exp4_test.dart
diff --git a/tests/corelib/reg_exp4_test.dart b/tests/corelib/reg_exp4_test.dart
index bef3397ae3b773535d89169128126480bbd40f4b..41d8f50743f884e8d72294849ec0d716d420d9c6 100644
--- a/tests/corelib/reg_exp4_test.dart
+++ b/tests/corelib/reg_exp4_test.dart
@@ -6,42 +6,42 @@
main() {
try {
RegExp ex = new RegExp(null);
- Expect.fail("Expected: ArgumentError got: no exception");
- } catch (ex) {
- if (!(ex is ArgumentError)) {
- Expect.fail("Expected: ArgumentError got: ${ex}");
+ Expect.fail("Expected: NullPointerException got: no exception");
+ } on Exception catch (ex) {
+ if (!(ex is NullPointerException)) {
+ Expect.fail("Expected: NullPointerException got: ${ex}");
}
}
try {
new RegExp(r"^\w+$").hasMatch(null);
- Expect.fail("Expected: ArgumentError got: no exception");
- } catch (ex) {
- if (!(ex is ArgumentError)) {
- Expect.fail("Expected: ArgumentError got: ${ex}");
+ Expect.fail("Expected: NullPointerException got: no exception");
+ } on Exception catch (ex) {
+ if (!(ex is NullPointerException)) {
+ Expect.fail("Expected: NullPointerException got: ${ex}");
}
}
try {
new RegExp(r"^\w+$").firstMatch(null);
- Expect.fail("Expected: ArgumentError got: no exception");
- } catch (ex) {
- if (!(ex is ArgumentError)) {
- Expect.fail("Expected: ArgumentError got: ${ex}");
+ Expect.fail("Expected: NullPointerException got: no exception");
+ } on Exception catch (ex) {
+ if (!(ex is NullPointerException)) {
+ Expect.fail("Expected: NullPointerException got: ${ex}");
}
}
try {
new RegExp(r"^\w+$").allMatches(null);
- Expect.fail("Expected: ArgumentError got: no exception");
- } catch (ex) {
- if (!(ex is ArgumentError)) {
- Expect.fail("Expected: ArgumentError got: ${ex}");
+ Expect.fail("Expected: NullPointerException got: no exception");
+ } on Exception catch (ex) {
+ if (!(ex is NullPointerException)) {
+ Expect.fail("Expected: NullPointerException got: ${ex}");
}
}
try {
new RegExp(r"^\w+$").stringMatch(null);
- Expect.fail("Expected: ArgumentError got: no exception");
- } catch (ex) {
- if (!(ex is ArgumentError)) {
- Expect.fail("Expected: ArgumentError got: ${ex}");
+ Expect.fail("Expected: NullPointerException got: no exception");
+ } on Exception catch (ex) {
+ if (!(ex is NullPointerException)) {
+ Expect.fail("Expected: NullPointerException got: ${ex}");
}
}
}
« no previous file with comments | « tests/corelib/null_nosuchmethod_test.dart ('k') | tests/corelib/reg_exp5_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698