Chromium Code Reviews| Index: tests/lib/mirrors/parameter_test.dart |
| diff --git a/tests/lib/mirrors/parameter_test.dart b/tests/lib/mirrors/parameter_test.dart |
| index 5e3518b77c47b2a8a7dd368fbd1a973e456221a3..da6dbfb35a1f348b2773fea1aeabb9d89cd5628e 100644 |
| --- a/tests/lib/mirrors/parameter_test.dart |
| +++ b/tests/lib/mirrors/parameter_test.dart |
| @@ -48,18 +48,18 @@ main() { |
| Map<Symbol, MethodMirror> constructors = cm.constructors; |
| List<Symbol> constructorKeys = [ |
| - const Symbol('B'), const Symbol('B.bar'), const Symbol('B.baz'), |
| - const Symbol('B.foo'), const Symbol('B.quux'), const Symbol('B.qux'), |
| - const Symbol('B.corge')]; |
| + #B, #B.bar, #B.baz, |
|
Michael Lippautz (Google)
2013/09/20 21:11:16
fits on one line?
|
| + #B.foo, #B.quux, #B.qux, |
| + #B.corge]; |
| Expect.setEquals(constructorKeys, constructors.keys); |
| - MethodMirror unnamedConstructor = constructors[const Symbol('B')]; |
| + MethodMirror unnamedConstructor = constructors[#B]; |
| expect('Method(s(B) in s(B), constructor)', unnamedConstructor); |
| expect('[]', unnamedConstructor.parameters); |
| expect('Class(s(B) in s(test.parameter_test), top-level)', |
| unnamedConstructor.returnType); |
| - MethodMirror fooConstructor = constructors[const Symbol('B.foo')]; |
| + MethodMirror fooConstructor = constructors[#B.foo]; |
| expect('Method(s(B.foo) in s(B), constructor)', fooConstructor); |
| expect('[Parameter(s(x) in s(B.foo),' |
| ' type = Class(s(int) in s(dart.core), top-level))]', |
| @@ -67,7 +67,7 @@ main() { |
| expect('Class(s(B) in s(test.parameter_test), top-level)', |
| fooConstructor.returnType); |
| - MethodMirror barConstructor = constructors[const Symbol('B.bar')]; |
| + MethodMirror barConstructor = constructors[#B.bar]; |
| expect('Method(s(B.bar) in s(B), constructor)', barConstructor); |
| expect('[Parameter(s(z) in s(B.bar),' |
| ' type = Class(s(int) in s(dart.core), top-level)), ' |
| @@ -80,7 +80,7 @@ main() { |
| // dart2js stops testing here. |
| return; /// 01: ok |
| - MethodMirror bazConstructor = constructors[const Symbol('B.baz')]; |
| + MethodMirror bazConstructor = constructors[#B.baz]; |
| expect('Method(s(B.baz) in s(B), constructor)', bazConstructor); |
| expect('[Parameter(s(x) in s(B.baz), final,' |
| ' type = Class(s(int) in s(dart.core), top-level)), ' |
| @@ -92,7 +92,7 @@ main() { |
| expect('Class(s(B) in s(test.parameter_test), top-level)', |
| bazConstructor.returnType); |
| - MethodMirror quxConstructor = constructors[const Symbol('B.qux')]; |
| + MethodMirror quxConstructor = constructors[#B.qux]; |
| expect('Method(s(B.qux) in s(B), constructor)', quxConstructor); |
| expect('[Parameter(s(x) in s(B.qux),' |
| ' type = Class(s(int) in s(dart.core), top-level)), ' |
| @@ -103,7 +103,7 @@ main() { |
| expect('Class(s(B) in s(test.parameter_test), top-level)', |
| quxConstructor.returnType); |
| - MethodMirror quuxConstructor = constructors[const Symbol('B.quux')]; |
| + MethodMirror quuxConstructor = constructors[#B.quux]; |
| expect('Method(s(B.quux) in s(B), constructor)', quuxConstructor); |
| expect('[Parameter(s(x) in s(B.quux),' |
| ' type = Class(s(int) in s(dart.core), top-level)), ' |
| @@ -114,7 +114,7 @@ main() { |
| expect('Class(s(B) in s(test.parameter_test), top-level)', |
| quuxConstructor.returnType); |
| - MethodMirror corgeConstructor = constructors[const Symbol('B.corge')]; |
| + MethodMirror corgeConstructor = constructors[#B.corge]; |
| expect('Method(s(B.corge) in s(B), constructor)', corgeConstructor); |
| expect('[Parameter(s(x) in s(B.corge), optional, named,' |
| ' value = Instance(value = 51),' |
| @@ -126,7 +126,7 @@ main() { |
| expect('Class(s(B) in s(test.parameter_test), top-level)', |
| corgeConstructor.returnType); |
| - MethodMirror xGetter = cm.getters[const Symbol('x')]; |
| + MethodMirror xGetter = cm.getters[#x]; |
| expect('Method(s(x) in s(B), getter)', xGetter); |
| expect('[]', xGetter.parameters); |
| @@ -136,21 +136,21 @@ main() { |
| ' type = Type(s(dynamic), top-level))]', |
| xSetter.parameters); |
| - MethodMirror grault = cm.members[const Symbol("grault")]; |
| + MethodMirror grault = cm.members[#grault]; |
| expect('Method(s(grault) in s(B))', grault); |
| expect('[Parameter(s(x) in s(grault), optional,' |
| ' type = Class(s(int) in s(dart.core), top-level))]', |
| grault.parameters); |
| expect('Instance(value = <null>)', grault.parameters[0].defaultValue); |
| - MethodMirror garply = cm.members[const Symbol("garply")]; |
| + MethodMirror garply = cm.members[#garply]; |
| expect('Method(s(garply) in s(B))', garply); |
| expect('[Parameter(s(y) in s(garply), optional, named,' |
| ' type = Class(s(int) in s(dart.core), top-level))]', |
| garply.parameters); |
| expect('Instance(value = <null>)', garply.parameters[0].defaultValue); |
| - MethodMirror waldo = cm.members[const Symbol("waldo")]; |
| + MethodMirror waldo = cm.members[#waldo]; |
| expect('Method(s(waldo) in s(B))', waldo); |
| expect('[Parameter(s(z) in s(waldo),' |
| ' type = Class(s(int) in s(dart.core), top-level))]', |
| @@ -159,7 +159,7 @@ main() { |
| cm = reflectClass(C); |
| - MethodMirror fooInC = cm.members[const Symbol("foo")]; |
| + MethodMirror fooInC = cm.members[#foo]; |
| expect('Method(s(foo) in s(C))', fooInC); |
| expect('[Parameter(s(a) in s(foo),' |
| ' type = Class(s(int) in s(dart.core), top-level)), ' |
| @@ -168,7 +168,7 @@ main() { |
| ' upperBound = Class(s(int) in s(dart.core), top-level)))]', |
| fooInC.parameters); |
| - MethodMirror barInC = cm.members[const Symbol("bar")]; |
| + MethodMirror barInC = cm.members[#bar]; |
| expect('Method(s(bar) in s(C))', barInC); |
| expect('[Parameter(s(a) in s(bar),' |
| ' type = TypeVariable(s(S) in s(C),' |