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

Unified Diff: pkg/serialization/test/serialization_test.dart

Issue 14773027: Fix regression in meta-serializing rules (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Slight improvement for the case of duplicate library names Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/serialization/lib/src/serialization_rule.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/serialization/test/serialization_test.dart
diff --git a/pkg/serialization/test/serialization_test.dart b/pkg/serialization/test/serialization_test.dart
index db5b5f1c07e7b952c93a4bae6c0ebd98cb9b82af..c65721a7be307177fc6ea4d4ec1ddc63816366aa 100644
--- a/pkg/serialization/test/serialization_test.dart
+++ b/pkg/serialization/test/serialization_test.dart
@@ -235,6 +235,25 @@ main() {
runRoundTripTest(nodeSerializerReflective);
});
+ test('round-trip with explicit self-description', () {
+ // We provide a setup function which, when run the second time,
+ // returns a blank serialization, to make sure it will fail
+ // the second time.
+ var s;
+ oneShotSetup(node) {
+ if (s == null) {
+ s = nodeSerializerReflective(node)..selfDescribing = true;
+ return s;
+ } else {
+ s = null;
+ return new Serialization.blank()
+ ..namedObjects['Node'] = reflect(new Node('')).type;;
+ }
+ }
+
+ runRoundTripTest(oneShotSetup);
+ });
+
test('round-trip ClosureRule', () {
runRoundTripTest(nodeSerializerNonReflective);
});
« no previous file with comments | « pkg/serialization/lib/src/serialization_rule.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698