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}"); |
} |
} |
} |