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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java

Issue 17603005: Report CONST_EVAL_THROWS_IDBZE when VM will throw IntegerDivisionByZeroException (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
index 444fb9e5a03f8e71173629e7ff03256f880726bb..8f4ace45830ed1d6dec329236f87d99792dc79ba 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
@@ -592,6 +592,13 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
check_constEvalThrowsException_binary_null("5 + null", true);
}
+ public void test_constEvalThrowsException_divisionByZero() throws Exception {
+ Source source = addSource("const C = 1 ~/ 0;");
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE);
+ verify(source);
+ }
+
public void test_constEvalThrowsException_unaryBitNot_null() throws Exception {
Source source = addSource("const C = ~null;");
resolve(source);

Powered by Google App Engine
This is Rietveld 408576698