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

Unified Diff: dart/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java

Issue 56933002: Version 0.8.10.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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: dart/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java
===================================================================
--- dart/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java (revision 29785)
+++ dart/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java (working copy)
@@ -34,35 +34,49 @@
"}");
}
- public void test_Boolean_or() throws Exception {
+ public void test_Boolean_and() throws Exception {
translateSingleFile(
"// filler filler filler filler filler filler filler filler filler filler",
"package test;",
"public class Test {",
- " public boolean test(boolean a, boolean b) {",
- " return a | b;",
+ " public boolean testAnd2(boolean a, boolean b) {",
+ " return a & b;",
" }",
+ " public boolean testAnd3(boolean a, boolean b, boolean c) {",
+ " return a & b & c;",
+ " }",
+ " public void testAndEq(boolean a, boolean b) {",
+ " a &= b;",
+ " }",
"}");
runProcessor();
assertFormattedSource(
"class Test {",
- " bool test(bool a, bool b) => javaBooleanOr(a, b);",
+ " bool testAnd2(bool a, bool b) => javaBooleanAnd(a, b);",
+ " bool testAnd3(bool a, bool b, bool c) => javaBooleanAnd(javaBooleanAnd(a, b), c);",
+ " void testAndEq(bool a, bool b) {",
+ " a = javaBooleanAnd(a, b);",
+ " }",
"}");
}
- public void test_Boolean_orEq() throws Exception {
+ public void test_Boolean_or() throws Exception {
translateSingleFile(
"// filler filler filler filler filler filler filler filler filler filler",
"package test;",
"public class Test {",
- " public void test(boolean a, boolean b) {",
+ " public boolean test1(boolean a, boolean b) {",
+ " return a | b;",
+ " }",
+ " public void test2(boolean a, boolean b) {",
" a |= b;",
" }",
"}");
runProcessor();
assertFormattedSource(
"class Test {",
- " void test(bool a, bool b) {",
+ " bool test1(bool a, bool b) => javaBooleanOr(a, b);",
+ " void test2(bool a, bool b) {",
" a = javaBooleanOr(a, b);",
" }",
"}");

Powered by Google App Engine
This is Rietveld 408576698