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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractUtilsTest.java

Issue 10425002: Resolve operators to int/double instead of num where possible (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Test for ~/ with doubles Created 8 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.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractUtilsTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractUtilsTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractUtilsTest.java
index 594a20bd6d0174f6c1d515b2b36bb6f62c68c2dc..2b624437065fcdc2403cc14ae1f7e1ff947c0b6c 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractUtilsTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractUtilsTest.java
@@ -154,7 +154,7 @@ public final class ExtractUtilsTest extends AbstractDartTest {
}
public void test_getType_binaryExpression_DIV_int_int() throws Exception {
- assertTypeSimple("int", "1 / 2");
+ assertTypeSimple("double", "1 / 2");
}
public void test_getType_binaryExpression_EQ() throws Exception {
@@ -217,6 +217,10 @@ public final class ExtractUtilsTest extends AbstractDartTest {
assertTypeSimple(null, "'1' - 2");
}
+ public void test_getType_binaryExpression_TRUNC_int_int() throws Exception {
+ assertTypeSimple("int", "1 ~/ 2");
+ }
+
public void test_getType_binaryExpression_unknownArg1() throws Exception {
assertType(null, new String[] {
"// filler filler filler filler filler filler filler filler filler filler",
@@ -225,7 +229,7 @@ public final class ExtractUtilsTest extends AbstractDartTest {
}
public void test_getType_binaryExpression_unknownArg2() throws Exception {
- assertType(null, new String[] {
+ assertType("num", new String[] {
"// filler filler filler filler filler filler filler filler filler filler",
"var x = 1 + unknown;",
""});
@@ -297,7 +301,7 @@ public final class ExtractUtilsTest extends AbstractDartTest {
}
public void test_getType_newExpression_unknownConstructor() throws Exception {
- assertType(null, new String[] {
+ assertType("MyClass", new String[] {
"// filler filler filler filler filler filler filler filler filler filler",
"class MyClass {",
"}",
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698