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

Unified Diff: editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/correction/QuickAssistProcessorImplTest.java

Issue 150853003: Terminate JSON generator Quick Assist. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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.services_test/src/com/google/dart/engine/services/internal/correction/QuickAssistProcessorImplTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/correction/QuickAssistProcessorImplTest.java b/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/correction/QuickAssistProcessorImplTest.java
index 9018f80a02e67566bd9610cea1d472c4f13d733d..a1df70eff03500b4ae736a5f2fc63f85cc5c5eb2 100644
--- a/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/correction/QuickAssistProcessorImplTest.java
+++ b/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/correction/QuickAssistProcessorImplTest.java
@@ -72,128 +72,6 @@ public class QuickAssistProcessorImplTest extends RefactoringImplTest {
private SourceCorrectionProposal resultProposal;
private String resultSource;
- public void test_addJson_ignoreOtherLibraryPrivates() throws Exception {
- addSource(
- "/my_lib.dart",
- makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "library lib;",
- "class HasCost {",
- " int _cost;",
- "}"));
- String initial = makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "import 'my_lib.dart';",
- "class Unit extends HasCost {",
- " int health;",
- " int mana;",
- "}");
- String expected = makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "import 'my_lib.dart';",
- "class Unit extends HasCost {",
- " int health;",
- " int mana;",
- "",
- " Unit.fromJson(Map json) {",
- " health = json['health'];",
- " mana = json['mana'];",
- " }",
- "",
- " Map toJson() {",
- " return {'health' : health, 'mana' : mana};",
- " }",
- "}");
- assert_addJson(initial, "class Unit", expected);
- }
-
- public void test_addJson_insert() throws Exception {
- String initial = makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class HasCost {",
- " int cost;",
- "}",
- "class Unit extends HasCost {",
- " int health;",
- " int mana;",
- "}");
- String expected = makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class HasCost {",
- " int cost;",
- "}",
- "class Unit extends HasCost {",
- " int health;",
- " int mana;",
- "",
- " Unit.fromJson(Map json) {",
- " cost = json['cost'];",
- " health = json['health'];",
- " mana = json['mana'];",
- " }",
- "",
- " Map toJson() {",
- " return {'cost' : cost, 'health' : health, 'mana' : mana};",
- " }",
- "}");
- assert_addJson(initial, "class Unit", expected);
- assert_addJson(initial, "Unit extends", expected);
- }
-
- public void test_addJson_noFields() throws Exception {
- String initial = makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class Unit {",
- " void attack() {}",
- "}");
- String expected = makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class Unit {",
- " void attack() {}",
- "}");
- assert_addJson(initial, "class Unit", expected);
- }
-
- public void test_addJson_replace() throws Exception {
- String initial = makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class HasCost {",
- " int cost;",
- "}",
- "class Unit extends HasCost {",
- " int health;",
- " int mana;",
- "",
- " Unit.fromJson(Map json) {",
- " // empty",
- " }",
- "",
- " Map toJson() {",
- " // empty",
- " }",
- "}");
- String expected = makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class HasCost {",
- " int cost;",
- "}",
- "class Unit extends HasCost {",
- " int health;",
- " int mana;",
- "",
- " Unit.fromJson(Map json) {",
- " cost = json['cost'];",
- " health = json['health'];",
- " mana = json['mana'];",
- " }",
- "",
- " Map toJson() {",
- " return {'cost' : cost, 'health' : health, 'mana' : mana};",
- " }",
- "}");
- assert_addJson(initial, "class Unit", expected);
- }
-
public void test_addPartDirective() throws Exception {
String libCode = makeSource(
"// filler filler filler filler filler filler filler filler filler filler",
@@ -2139,11 +2017,6 @@ public class QuickAssistProcessorImplTest extends RefactoringImplTest {
assert_surroundsWith(initial, CorrectionKind.QA_SURROUND_WITH_WHILE, expected);
}
- private void assert_addJson(String initialSource, String offsetPattern, String expectedSource)
- throws Exception {
- assert_runProcessor(CorrectionKind.QA_ADD_JSON, initialSource, offsetPattern, expectedSource);
- }
-
private void assert_addTypeAnnotation(String initialSource, String offsetPattern,
String expectedSource) throws Exception {
assert_runProcessor(

Powered by Google App Engine
This is Rietveld 408576698