| Index: pkg/serialization/test/serialization_test.dart
|
| diff --git a/pkg/serialization/test/serialization_test.dart b/pkg/serialization/test/serialization_test.dart
|
| index 2987fe09033eda36c7af28e189ec2bc621c7b8ea..0729fdd10ec87ad0b6087c3f8bb74f11fdafaf9c 100644
|
| --- a/pkg/serialization/test/serialization_test.dart
|
| +++ b/pkg/serialization/test/serialization_test.dart
|
| @@ -123,9 +123,16 @@ main() {
|
| var stream = new Stream([3,4,5]);
|
| expect((stream..next()).next(), 4);
|
| expect(stream.position, 2);
|
| + // The Symbol class does not allow us to create symbols for private
|
| + // variables. However, the mirror system uses them. So we get the symbol
|
| + // we want from the mirror.
|
| + // TODO(alanknight): Either delete this test and decide we shouldn't
|
| + // attempt to access private variables or fix this properly.
|
| + var _collectionSym = reflect(stream).type.variables.keys.firstWhere(
|
| + (x) => MirrorSystem.getName(x) == "_collection");
|
| var s = new Serialization()
|
| ..addRuleFor(stream,
|
| - constructorFields: ['_collection']);
|
| + constructorFields: [_collectionSym]);
|
| var state = states(stream, s).first;
|
| // Define names for the variable offsets to make this more readable.
|
| var _collection = 0, position = 1;
|
| @@ -211,7 +218,7 @@ main() {
|
| var w = new Writer(s);
|
| w.trace = new Trace(w);
|
| w.write(n1);
|
| - expect(w.states.length, 5); // prims, lists, essential lists, basic
|
| + expect(w.states.length, 6); // prims, lists, essential lists, basic, symbol
|
| var children = 0, name = 1, parent = 2;
|
| var nodeRule = s.rules.firstWhere((x) => x is BasicRule);
|
| List rootNode = w.states[nodeRule.number].where(
|
|
|