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

Side by Side Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/internal/text/SemanticHighlightingTest.java

Issue 46593003: Add @proxy to annotations.dart - remove package:meta. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 1 month 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 2013, the Dart project authors. 2 * Copyright 2013, 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 "}", 402 "}",
403 "main() {", 403 "main() {",
404 " new A.name ();", 404 " new A.name ();",
405 "}", 405 "}",
406 ""); 406 "");
407 assertHasWordPosition(SemanticHighlightings.CONSTRUCTOR, "name () {}"); 407 assertHasWordPosition(SemanticHighlightings.CONSTRUCTOR, "name () {}");
408 assertHasWordPosition(SemanticHighlightings.CONSTRUCTOR, "name ();"); 408 assertHasWordPosition(SemanticHighlightings.CONSTRUCTOR, "name ();");
409 } 409 }
410 410
411 public void test_deprecated() throws Exception { 411 public void test_deprecated() throws Exception {
412 setFileContent(
413 "meta.dart",
414 makeSource(
415 "// filler filler filler filler filler filler filler filler filler f iller",
416 "library meta;",
417 "// const deprecated = 42;",
418 ""));
419 preparePositions( 412 preparePositions(
420 "// filler filler filler filler filler filler filler filler filler fille r", 413 "// filler filler filler filler filler filler filler filler filler fille r",
421 "import 'meta.dart';",
422 "@deprecated", 414 "@deprecated",
423 "class A {", 415 "class A {",
424 " @deprecated", 416 " @deprecated",
425 " method() {}", 417 " method() {}",
426 " @deprecated", 418 " @deprecated",
427 " var field;", 419 " var field;",
428 " @deprecated", 420 " @deprecated",
429 " get myGet => null;", 421 " get myGet => null;",
430 " @deprecated", 422 " @deprecated",
431 " set mySet(x) {}", 423 " set mySet(x) {}",
(...skipping 11 matching lines...) Expand all
443 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "A a;"); 435 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "A a;");
444 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "method ();" ); 436 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "method ();" );
445 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "field ;"); 437 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "field ;");
446 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "field ="); 438 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "field =");
447 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "myGet ;"); 439 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "myGet ;");
448 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "mySet ="); 440 assertHasWordPosition(SemanticHighlightings.DEPRECATED_ELEMENT, "mySet =");
449 } 441 }
450 442
451 public void test_deprecated_libraryImport() throws Exception { 443 public void test_deprecated_libraryImport() throws Exception {
452 setFileContent( 444 setFileContent(
453 "meta.dart",
454 makeSource(
455 "// filler filler filler filler filler filler filler filler filler f iller",
456 "library meta;",
457 "// const deprecated = 42;",
458 ""));
459 setFileContent(
460 "ModernLib.dart", 445 "ModernLib.dart",
461 makeSource( 446 makeSource(
462 "// filler filler filler filler filler filler filler filler filler f iller", 447 "// filler filler filler filler filler filler filler filler filler f iller",
463 "library modernLib;", 448 "library modernLib;",
464 "")); 449 ""));
465 setFileContent( 450 setFileContent(
466 "DeprecatedLib.dart", 451 "DeprecatedLib.dart",
467 makeSource( 452 makeSource(
468 "// filler filler filler filler filler filler filler filler filler f iller", 453 "// filler filler filler filler filler filler filler filler filler f iller",
469 "import '/meta.dart';",
470 "@deprecated", 454 "@deprecated",
471 "library deprecatedLib;", 455 "library deprecatedLib;",
472 "// const deprecated = 0;", 456 "// const deprecated = 0;",
473 "")); 457 ""));
474 preparePositions( 458 preparePositions(
475 "// filler filler filler filler filler filler filler filler filler fille r", 459 "// filler filler filler filler filler filler filler filler filler fille r",
476 "library App;", 460 "library App;",
477 "import 'ModernLib.dart';", 461 "import 'ModernLib.dart';",
478 "import 'DeprecatedLib.dart';", 462 "import 'DeprecatedLib.dart';",
479 ""); 463 "");
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 highlighting.getDefaultStyle(); 913 highlighting.getDefaultStyle();
930 highlighting.getDefaultTextColor(); 914 highlighting.getDefaultTextColor();
931 } 915 }
932 } 916 }
933 917
934 private void preparePositions(String... lines) throws Exception { 918 private void preparePositions(String... lines) throws Exception {
935 parseTestUnit(lines); 919 parseTestUnit(lines);
936 preparePositions(); 920 preparePositions();
937 } 921 }
938 } 922 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698