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

Side by Side Diff: frog/tests/leg/src/ResolverTest.dart

Issue 9284022: Operators. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | frog/tests/leg_only/src/CompoundOperatorIndexTest.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #import("../../../leg/leg.dart"); 5 #import("../../../leg/leg.dart");
6 #import("../../../leg/elements/elements.dart"); 6 #import("../../../leg/elements/elements.dart");
7 #import("../../../leg/tree/tree.dart"); 7 #import("../../../leg/tree/tree.dart");
8 #import("../../../leg/util/util.dart"); 8 #import("../../../leg/util/util.dart");
9 #import("mock_compiler.dart"); 9 #import("mock_compiler.dart");
10 #import("parser_helper.dart"); 10 #import("parser_helper.dart");
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 A() : foo(); 510 A() : foo();
511 }"""; 511 }""";
512 resolveConstructor(script, "A a = new A();", "A", "A", 0, 512 resolveConstructor(script, "A a = new A();", "A", "A", 0,
513 [], [MessageKind.CONSTRUCTOR_CALL_EXPECTED]); 513 [], [MessageKind.CONSTRUCTOR_CALL_EXPECTED]);
514 514
515 script = """class A { 515 script = """class A {
516 int i; 516 int i;
517 A.a() : this.b(0); 517 A.a() : this.b(0);
518 A.b(int i); 518 A.b(int i);
519 }"""; 519 }""";
520 resolveConstructor(script, "A a = new A.a();", "A", "A.a", 1, 520 resolveConstructor(script, "A a = new A.a();", "A", @"A$a", 1,
521 [], []); 521 [], []);
522 522
523 script = """class A { 523 script = """class A {
524 int i; 524 int i;
525 A.a() : i = 42, this(0); 525 A.a() : i = 42, this(0);
526 A(int i); 526 A(int i);
527 }"""; 527 }""";
528 resolveConstructor(script, "A a = new A.a();", "A", "A.a", 2, 528 resolveConstructor(script, "A a = new A.a();", "A", @"A$a", 2,
529 [], [MessageKind.REDIRECTING_CTOR_HAS_INITIALIZER]); 529 [], [MessageKind.REDIRECTING_CTOR_HAS_INITIALIZER]);
530 530
531 script = """class A { 531 script = """class A {
532 int i; 532 int i;
533 A(i); 533 A(i);
534 } 534 }
535 class B extends A { 535 class B extends A {
536 B() : super(0); 536 B() : super(0);
537 }"""; 537 }""";
538 resolveConstructor(script, "B a = new B();", "B", "B", 1, 538 resolveConstructor(script, "B a = new B();", "B", "B", 1,
(...skipping 16 matching lines...) Expand all
555 } 555 }
556 556
557 map(FullResolverVisitor visitor) { 557 map(FullResolverVisitor visitor) {
558 TreeElementMapping elements = visitor.mapping; 558 TreeElementMapping elements = visitor.mapping;
559 return elements.map; 559 return elements.map;
560 } 560 }
561 561
562 length(Link link) => link.isEmpty() ? 0 : length(link.tail) + 1; 562 length(Link link) => link.isEmpty() ? 0 : length(link.tail) + 1;
563 563
564 at(Link link, int index) => (index == 0) ? link.head : at(link.tail, index - 1); 564 at(Link link, int index) => (index == 0) ? link.head : at(link.tail, index - 1);
OLDNEW
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | frog/tests/leg_only/src/CompoundOperatorIndexTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698