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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java

Issue 18140004: Report EQUALITY_CANNOT_BE_EQUALITY_OPERAND (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Additional test 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/parser/ErrorParserTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
index ff881444bd7ca2481d069c814871e10937489f39..0b2ef2ccedfba545a55216649316d0537fffe586 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
@@ -379,6 +379,18 @@ public class ErrorParserTest extends ParserTestCase {
ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT);
}
+ public void test_equalityCannotBeEqualityOperand_eq_eq() throws Exception {
+ parseExpression("1 == 2 == 3", ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND);
+ }
+
+ public void test_equalityCannotBeEqualityOperand_eq_neq() throws Exception {
+ parseExpression("1 == 2 != 3", ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND);
+ }
+
+ public void test_equalityCannotBeEqualityOperand_neq_eq() throws Exception {
+ parseExpression("1 != 2 == 3", ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND);
+ }
+
public void test_expectedCaseOrDefault() throws Exception {
parse("parseSwitchStatement", "switch (e) {break;}", ParserErrorCode.EXPECTED_CASE_OR_DEFAULT);
}

Powered by Google App Engine
This is Rietveld 408576698