diff options
Diffstat (limited to 'test/core/model')
-rw-r--r-- | test/core/model/DomainTest.cpp | 26 | ||||
-rw-r--r-- | test/core/model/TestAdvanced.hpp | 4 | ||||
-rw-r--r-- | test/core/model/TestDomain.hpp | 8 |
3 files changed, 19 insertions, 19 deletions
diff --git a/test/core/model/DomainTest.cpp b/test/core/model/DomainTest.cpp index 8fcd21d..0c85d10 100644 --- a/test/core/model/DomainTest.cpp +++ b/test/core/model/DomainTest.cpp @@ -154,25 +154,25 @@ TEST(Descriptor, pathToAdvanced) // Let's create the classes that we need first Rooted<StructuredClass> A{new StructuredClass( - mgr, "A", domain, AnyCardinality, {nullptr}, false, true)}; + mgr, "A", domain, Cardinality::any(), {nullptr}, false, true)}; Rooted<StructuredClass> start{new StructuredClass( - mgr, "start", domain, AnyCardinality, A, false, false)}; + mgr, "start", domain, Cardinality::any(), A, false, false)}; Rooted<StructuredClass> B{new StructuredClass( - mgr, "B", domain, AnyCardinality, {nullptr}, true, false)}; + mgr, "B", domain, Cardinality::any(), {nullptr}, true, false)}; Rooted<StructuredClass> C{ - new StructuredClass(mgr, "C", domain, AnyCardinality, B, true, false)}; + new StructuredClass(mgr, "C", domain, Cardinality::any(), B, true, false)}; Rooted<StructuredClass> D{new StructuredClass( - mgr, "D", domain, AnyCardinality, {nullptr}, true, false)}; + mgr, "D", domain, Cardinality::any(), {nullptr}, true, false)}; Rooted<StructuredClass> E{new StructuredClass( - mgr, "E", domain, AnyCardinality, {nullptr}, true, false)}; + mgr, "E", domain, Cardinality::any(), {nullptr}, true, false)}; Rooted<StructuredClass> target{ - new StructuredClass(mgr, "target", domain, AnyCardinality)}; + new StructuredClass(mgr, "target", domain, Cardinality::any())}; // We create two fields for A Rooted<FieldDescriptor> A_field{new FieldDescriptor(mgr, A)}; @@ -223,19 +223,19 @@ TEST(StructuredClass, isSubclassOf) Rooted<SystemTypesystem> sys{new SystemTypesystem(mgr)}; Rooted<Domain> domain{new Domain(mgr, sys, "inheritance")}; Rooted<StructuredClass> A{new StructuredClass( - mgr, "A", domain, AnyCardinality, {nullptr}, false, true)}; + mgr, "A", domain, Cardinality::any(), {nullptr}, false, true)}; // first branch Rooted<StructuredClass> B{ - new StructuredClass(mgr, "B", domain, AnyCardinality, A)}; + new StructuredClass(mgr, "B", domain, Cardinality::any(), A)}; Rooted<StructuredClass> C{ - new StructuredClass(mgr, "C", domain, AnyCardinality, B)}; + new StructuredClass(mgr, "C", domain, Cardinality::any(), B)}; // second branch Rooted<StructuredClass> D{ - new StructuredClass(mgr, "D", domain, AnyCardinality, A)}; + new StructuredClass(mgr, "D", domain, Cardinality::any(), A)}; Rooted<StructuredClass> E{ - new StructuredClass(mgr, "E", domain, AnyCardinality, D)}; + new StructuredClass(mgr, "E", domain, Cardinality::any(), D)}; Rooted<StructuredClass> F{ - new StructuredClass(mgr, "F", domain, AnyCardinality, D)}; + new StructuredClass(mgr, "F", domain, Cardinality::any(), D)}; // check function results ASSERT_FALSE(A->isSubclassOf(A)); diff --git a/test/core/model/TestAdvanced.hpp b/test/core/model/TestAdvanced.hpp index 2e4a541..56738af 100644 --- a/test/core/model/TestAdvanced.hpp +++ b/test/core/model/TestAdvanced.hpp @@ -86,7 +86,7 @@ static Rooted<Domain> constructListDomain(Manager &mgr, Rooted<StructuredClass> p = resolveDescriptor(bookDomain, "paragraph"); // set up item StructuredClass; Rooted<StructuredClass> item{new StructuredClass( - mgr, "item", domain, AnyCardinality, {nullptr}, false)}; + mgr, "item", domain, Cardinality::any(), {nullptr}, false)}; // as field we want to copy the field of paragraph. item->copyFieldDescriptor(p->getFieldDescriptors()[0]); @@ -94,7 +94,7 @@ static Rooted<Domain> constructListDomain(Manager &mgr, std::vector<std::string> listTypes{"ol", "ul"}; for (auto &listType : listTypes) { Rooted<StructuredClass> list{new StructuredClass( - mgr, listType, domain, AnyCardinality, p, false)}; + mgr, listType, domain, Cardinality::any(), p, false)}; Rooted<FieldDescriptor> list_field{new FieldDescriptor(mgr, list)}; list_field->addChild(item); } diff --git a/test/core/model/TestDomain.hpp b/test/core/model/TestDomain.hpp index 18c42bd..8b572a8 100644 --- a/test/core/model/TestDomain.hpp +++ b/test/core/model/TestDomain.hpp @@ -46,7 +46,7 @@ static Rooted<Domain> constructBookDomain(Manager &mgr, // From there on the "section". Rooted<StructuredClass> section{ - new StructuredClass(mgr, "section", domain, AnyCardinality)}; + new StructuredClass(mgr, "section", domain, Cardinality::any())}; book_field->addChild(section); // And the field of it. @@ -54,7 +54,7 @@ static Rooted<Domain> constructBookDomain(Manager &mgr, // We also add the "paragraph", which is transparent. Rooted<StructuredClass> paragraph{new StructuredClass( - mgr, "paragraph", domain, AnyCardinality, {nullptr}, true)}; + mgr, "paragraph", domain, Cardinality::any(), {nullptr}, true)}; section_field->addChild(paragraph); book_field->addChild(paragraph); @@ -64,7 +64,7 @@ static Rooted<Domain> constructBookDomain(Manager &mgr, // We append "subsection" to section. Rooted<StructuredClass> subsection{ - new StructuredClass(mgr, "subsection", domain, AnyCardinality)}; + new StructuredClass(mgr, "subsection", domain, Cardinality::any())}; section_field->addChild(subsection); // And the field of it. @@ -76,7 +76,7 @@ static Rooted<Domain> constructBookDomain(Manager &mgr, // Finally we add the "text" node, which is transparent as well. Rooted<StructuredClass> text{new StructuredClass( - mgr, "text", domain, AnyCardinality, {nullptr}, true)}; + mgr, "text", domain, Cardinality::any(), {nullptr}, true)}; paragraph_field->addChild(text); // ... and has a primitive field. |