| 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(
|
|
|