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

Unified Diff: tests/language/src/StringConcatTest.dart

Issue 9408001: Throw NoSuchMethod or IllegalArgument on bad operators or bad arguments to (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 10 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 | « tests/language/src/Arithmetic2Test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/StringConcatTest.dart
diff --git a/tests/language/src/StringConcatTest.dart b/tests/language/src/StringConcatTest.dart
index fbc303df440a2f1a138469b359521d453f94a5e9..b25b1002593f7c5d485e29e72552b68af484064b 100644
--- a/tests/language/src/StringConcatTest.dart
+++ b/tests/language/src/StringConcatTest.dart
@@ -45,6 +45,12 @@ class StringConcatTest {
} catch (TypeError e) {
// In type checked mode.
nofExceptions++;
+ } catch (IllegalArgumentException e) {
+ // TODO(floitsch): IllegalArgumentException might not be correct. If
+ // number operations are supposed to be implemented as double-dispatch
+ // then we should get a NoSuchMethodException instead. In frog the
+ // argument is eagerly checked and throws an IllegalArgumentException.
+ nofExceptions++;
}
// Check that compile time constants are canonicalized.
« no previous file with comments | « tests/language/src/Arithmetic2Test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698