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

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

Issue 51043010: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename to getFirstToken(). 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: editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java
diff --git a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java
index 5fa5862c0d4ab420bce0bd96c4896a2c8ed91036..dfe51b66ef8650439980d9650508e4f4f0ecef5e 100644
--- a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java
+++ b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java
@@ -34,35 +34,49 @@ public class ObjectSemanticProcessorTest extends SemanticProcessorTest {
"}");
}
- 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