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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java

Issue 11087018: Issue 5652. Suggest to use effective integer division ~/, warning and Quick Fix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/correction/QuickFixProcessorTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java
index 5c20636a47fcd359013a8deeda5ff3d2c09f1ba5..03e2f3380ebc292403f7ce924f9a0edba6a4da92 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java
@@ -693,6 +693,22 @@ public final class QuickFixProcessorTest extends AbstractDartTest {
"");
}
+ public void test_useEffectiveIntegerDivision() throws Exception {
+ proposalNamePrefix = "Use effective integer division ~/";
+ setTestUnitContent(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "main() {",
+ " print( (7 / 2).toInt() );",
+ "}",
+ "");
+ assertQuickFix(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "main() {",
+ " print( 7 ~/ 2 );",
+ "}",
+ "");
+ }
+
public void test_useStaticAccess_method() throws Exception {
proposalNamePrefix = "Change access to static using 'A'";
setTestUnitContent(
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/correction/QuickFixProcessor.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698