From 7a8a8a31416cfebf785135754035608f4d919bf5 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Tue, 3 Feb 2015 22:36:32 +0100 Subject: removed references to variant::cardinality where I did not need them. --- test/core/model/DomainTest.cpp | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'test/core/model/DomainTest.cpp') diff --git a/test/core/model/DomainTest.cpp b/test/core/model/DomainTest.cpp index 767ac0c..32cdd24 100644 --- a/test/core/model/DomainTest.cpp +++ b/test/core/model/DomainTest.cpp @@ -151,30 +151,28 @@ TEST(Descriptor, pathToAdvanced) Rooted sys{new SystemTypesystem(mgr)}; // Construct the domain Rooted domain{new Domain(mgr, sys, "nasty")}; - Variant::cardinalityType any; - any.merge(Range::typeRange()); // Let's create the classes that we need first Rooted A{new StructuredClass( - mgr, "A", domain, any, {nullptr}, {nullptr}, false, true)}; + mgr, "A", domain, AnyCardinality, {nullptr}, {nullptr}, false, true)}; Rooted start{new StructuredClass( - mgr, "start", domain, any, {nullptr}, A, false, false)}; + mgr, "start", domain, AnyCardinality, {nullptr}, A, false, false)}; Rooted B{new StructuredClass( - mgr, "B", domain, any, {nullptr}, {nullptr}, true, false)}; + mgr, "B", domain, AnyCardinality, {nullptr}, {nullptr}, true, false)}; - Rooted C{ - new StructuredClass(mgr, "C", domain, any, {nullptr}, B, true, false)}; + Rooted C{new StructuredClass( + mgr, "C", domain, AnyCardinality, {nullptr}, B, true, false)}; Rooted D{new StructuredClass( - mgr, "D", domain, any, {nullptr}, {nullptr}, true, false)}; + mgr, "D", domain, AnyCardinality, {nullptr}, {nullptr}, true, false)}; Rooted E{new StructuredClass( - mgr, "E", domain, any, {nullptr}, {nullptr}, true, false)}; + mgr, "E", domain, AnyCardinality, {nullptr}, {nullptr}, true, false)}; Rooted target{ - new StructuredClass(mgr, "target", domain, any)}; + new StructuredClass(mgr, "target", domain, AnyCardinality)}; // We create two fields for A Rooted A_field{new FieldDescriptor(mgr, A)}; @@ -224,22 +222,20 @@ TEST(StructuredClass, isSubclassOf) Manager mgr{1}; Rooted sys{new SystemTypesystem(mgr)}; Rooted domain{new Domain(mgr, sys, "inheritance")}; - Variant::cardinalityType any; - any.merge(Range::typeRange()); Rooted A{new StructuredClass( - mgr, "A", domain, any, {nullptr}, {nullptr}, false, true)}; + mgr, "A", domain, AnyCardinality, {nullptr}, {nullptr}, false, true)}; // first branch Rooted B{ - new StructuredClass(mgr, "B", domain, any, {nullptr}, A)}; + new StructuredClass(mgr, "B", domain, AnyCardinality, {nullptr}, A)}; Rooted C{ - new StructuredClass(mgr, "C", domain, any, {nullptr}, B)}; + new StructuredClass(mgr, "C", domain, AnyCardinality, {nullptr}, B)}; // second branch Rooted D{ - new StructuredClass(mgr, "D", domain, any, {nullptr}, A)}; + new StructuredClass(mgr, "D", domain, AnyCardinality, {nullptr}, A)}; Rooted E{ - new StructuredClass(mgr, "E", domain, any, {nullptr}, D)}; + new StructuredClass(mgr, "E", domain, AnyCardinality, {nullptr}, D)}; Rooted F{ - new StructuredClass(mgr, "F", domain, any, {nullptr}, D)}; + new StructuredClass(mgr, "F", domain, AnyCardinality, {nullptr}, D)}; // check function results ASSERT_FALSE(A->isSubclassOf(A)); -- cgit v1.2.3