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

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

Issue 11233061: Revert "Parts must start with 'part of'" and "Attempt to fix VM build" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. 2 * Copyright (c) 2012, the Dart project authors.
3 * 3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except
5 * in compliance with the License. You may obtain a copy of the License at 5 * in compliance with the License. You may obtain a copy of the License at
6 * 6 *
7 * http://www.eclipse.org/legal/epl-v10.html 7 * http://www.eclipse.org/legal/epl-v10.html
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License 9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 "}", 467 "}",
468 ""}); 468 ""});
469 setUnitContent("App.dart", new String[] { 469 setUnitContent("App.dart", new String[] {
470 "// filler filler filler filler filler filler filler filler filler fille r", 470 "// filler filler filler filler filler filler filler filler filler fille r",
471 "library App;", 471 "library App;",
472 "import 'dart:core';", 472 "import 'dart:core';",
473 "part 'Test.dart';", 473 "part 'Test.dart';",
474 ""}); 474 ""});
475 setTestUnitContent( 475 setTestUnitContent(
476 "// filler filler filler filler filler filler filler filler filler fille r", 476 "// filler filler filler filler filler filler filler filler filler fille r",
477 "part of App;",
478 "main() {", 477 "main() {",
479 " AAA a = null;", 478 " AAA a = null;",
480 "}", 479 "}",
481 ""); 480 "");
482 // we have "fix", note that preview is for library 481 // we have "fix", note that preview is for library
483 assertQuickFix( 482 assertQuickFix(
484 "// filler filler filler filler filler filler filler filler filler fille r", 483 "// filler filler filler filler filler filler filler filler filler fille r",
485 "library App;", 484 "library App;",
486 "import 'dart:core';", 485 "import 'dart:core';",
487 "import 'LibA.dart';", 486 "import 'LibA.dart';",
488 "part 'Test.dart';", 487 "part 'Test.dart';",
489 ""); 488 "");
490 // unit itself is not changed 489 // unit itself is not changed
491 assertTestUnitContent( 490 assertTestUnitContent(
492 "// filler filler filler filler filler filler filler filler filler fille r", 491 "// filler filler filler filler filler filler filler filler filler fille r",
493 "part of App;",
494 "main() {", 492 "main() {",
495 " AAA a = null;", 493 " AAA a = null;",
496 "}", 494 "}",
497 ""); 495 "");
498 } 496 }
499 497
500 public void test_importLibrary_withType_hasImportWithPrefix() throws Exception { 498 public void test_importLibrary_withType_hasImportWithPrefix() throws Exception {
501 proposalNamePrefix = "Use imported library 'Lib.dart' with prefix 'lib'"; 499 proposalNamePrefix = "Use imported library 'Lib.dart' with prefix 'lib'";
502 setUnitContent("Lib.dart", new String[] { 500 setUnitContent("Lib.dart", new String[] {
503 "// filler filler filler filler filler filler filler filler filler fille r", 501 "// filler filler filler filler filler filler filler filler filler fille r",
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 858
861 private void sortByRelavance(IDartCompletionProposal[] proposals) { 859 private void sortByRelavance(IDartCompletionProposal[] proposals) {
862 Arrays.sort(proposals, new Comparator<IDartCompletionProposal>() { 860 Arrays.sort(proposals, new Comparator<IDartCompletionProposal>() {
863 @Override 861 @Override
864 public int compare(IDartCompletionProposal o1, IDartCompletionProposal o2) { 862 public int compare(IDartCompletionProposal o1, IDartCompletionProposal o2) {
865 return o2.getRelevance() - o1.getRelevance(); 863 return o2.getRelevance() - o1.getRelevance();
866 } 864 }
867 }); 865 });
868 } 866 }
869 } 867 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698