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

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

Issue 280873002: Fix for issue 16423 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Missed issue number Created 6 years, 7 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/NonErrorResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
index ec78d427d7717a4e6d0d112ae9a09476556562d2..ca001e00fc716c4e9c856907579964f3c04b10ad 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
@@ -2685,6 +2685,46 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_nonBoolOperand_and_bool() throws Exception {
+ Source source = addSource(createSource(//
+ "bool f(bool left, bool right) {",
+ " return left && right;",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
+ public void test_nonBoolOperand_and_dynamic() throws Exception {
+ Source source = addSource(createSource(//
+ "bool f(left, dynamic right) {",
+ " return left && right;",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
+ public void test_nonBoolOperand_or_bool() throws Exception {
+ Source source = addSource(createSource(//
+ "bool f(bool left, bool right) {",
+ " return left || right;",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
+ public void test_nonBoolOperand_or_dynamic() throws Exception {
+ Source source = addSource(createSource(//
+ "bool f(dynamic left, right) {",
+ " return left || right;",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
public void test_nonConstantDefaultValue_function_named() throws Exception {
Source source = addSource(createSource(//
"f({x : 2 + 3}) {}"));

Powered by Google App Engine
This is Rietveld 408576698