diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2014-12-28 00:54:05 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2014-12-28 00:54:05 +0100 |
commit | 3f22fdbf6aa5d4543c122a91cf244046697a1ec9 (patch) | |
tree | a4ea51b9147d7773a5fa1d5fb1bbac3f644082ec /test/core/model/TestDomain.hpp | |
parent | 079b45a6745dc296a60622d5a4897ccdfcf1fa0f (diff) |
Finished StructType implementation, started to write unit tests
Diffstat (limited to 'test/core/model/TestDomain.hpp')
-rw-r--r-- | test/core/model/TestDomain.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/core/model/TestDomain.hpp b/test/core/model/TestDomain.hpp index 55a5d9b..d55bff7 100644 --- a/test/core/model/TestDomain.hpp +++ b/test/core/model/TestDomain.hpp @@ -30,13 +30,13 @@ namespace model { * * Currently contained: string, text (struct wrapper for string) */ -static Rooted<Typesystem> constructTypeSystem(Manager &mgr) +static Rooted<Typesystem> constructTypeSystem(Manager &mgr, Logger &logger) { Rooted<Typesystem> sys{new Typesystem(mgr, "std")}; Rooted<StringType> string{new StringType(mgr, sys)}; sys->addType(string); - Rooted<StructType> string_struct{new StructType( - mgr, "text", sys, {new Attribute(mgr, "content", string, "", false)})}; + Rooted<StructType> string_struct{StructType::createValidated( + mgr, "text", sys, nullptr, {new Attribute(mgr, "content", string, "", false)}, logger)}; sys->addType(string_struct); return sys; @@ -46,12 +46,12 @@ static Rooted<Typesystem> constructTypeSystem(Manager &mgr) * This constructs the "book" domain for test purposes. The structure of the * domain is fairly simple and can be seen from the construction itself. */ -static Rooted<Domain> constructBookDomain(Manager &mgr) +static Rooted<Domain> constructBookDomain(Manager &mgr, Logger &logger) { // Start with the Domain itself. Rooted<Domain> domain{new Domain(mgr, "book")}; // The standard type system. - domain->getTypesystems().push_back(constructTypeSystem(mgr)); + domain->getTypesystems().push_back(constructTypeSystem(mgr, logger)); // Set up the cardinalities we'll need. Cardinality single; single.merge({1}); |