From 3f22fdbf6aa5d4543c122a91cf244046697a1ec9 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 28 Dec 2014 00:54:05 +0100 Subject: Finished StructType implementation, started to write unit tests --- test/core/model/TestDomain.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/core/model/TestDomain.hpp') 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 constructTypeSystem(Manager &mgr) +static Rooted constructTypeSystem(Manager &mgr, Logger &logger) { Rooted sys{new Typesystem(mgr, "std")}; Rooted string{new StringType(mgr, sys)}; sys->addType(string); - Rooted string_struct{new StructType( - mgr, "text", sys, {new Attribute(mgr, "content", string, "", false)})}; + Rooted 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 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 constructBookDomain(Manager &mgr) +static Rooted constructBookDomain(Manager &mgr, Logger &logger) { // Start with the Domain itself. Rooted 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}); -- cgit v1.2.3