Mercurial > projects > orange
comparison tests/Subclass.d @ 47:9c9bbef6bf5e
Implemented unarchiveBaseClass. Enabled the unit tests for deserialize subclasses.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 13 Aug 2011 15:23:03 +0200 |
parents | 6f35fb47ca24 |
children |
comparison
equal
deleted
inserted
replaced
46:d6fbd0b3586e | 47:9c9bbef6bf5e |
---|---|
47 assert(archive.data().containsXmlTag("base", `type="Base" key="1" id="2"`)); | 47 assert(archive.data().containsXmlTag("base", `type="Base" key="1" id="2"`)); |
48 assert(archive.data().containsXmlTag("int", `key="a" id="3"`, "3")); | 48 assert(archive.data().containsXmlTag("int", `key="a" id="3"`, "3")); |
49 }; | 49 }; |
50 }; | 50 }; |
51 | 51 |
52 // describe("deserialize class with a base class") in { | 52 describe("deserialize class with a base class") in { |
53 // it("should return a deserialized string equal to the original string") in { | 53 it("should return a deserialized string equal to the original string") in { |
54 // auto subDeserialized = serializer.deserialize!(Sub)(archive.untypedData); | 54 auto subDeserialized = serializer.deserialize!(Sub)(archive.untypedData); |
55 // | 55 |
56 // assert(sub.a == subDeserialized.a); | 56 assert(sub.a == subDeserialized.a); |
57 // assert(sub.b == subDeserialized.b); | 57 assert(sub.b == subDeserialized.b); |
58 // }; | 58 }; |
59 // }; | 59 }; |
60 } | 60 } |