summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-14 02:44:30 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-14 02:44:30 +0100
commitfda708058907c6cfb803c883f1505c2cde7057a6 (patch)
tree08a49dd6f053b5ef97e4ec253ea77577bd770b06 /test
parent7d1b3c5df2eab1d42179332d467d5756aefed587 (diff)
parentc9c808971341c139d654c0e3eea3a461e700388a (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'test')
-rw-r--r--test/core/model/DomainTest.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/core/model/DomainTest.cpp b/test/core/model/DomainTest.cpp
index 61de4c4..3b62b48 100644
--- a/test/core/model/DomainTest.cpp
+++ b/test/core/model/DomainTest.cpp
@@ -122,5 +122,34 @@ TEST(Descriptor, pathTo)
// this should be impossible.
ASSERT_EQ(0U, path.size());
}
+
+TEST(Descriptor, pathToAdvanced)
+{
+ // Now we build a really nasty domain with lots of transparency
+ // and inheritance
+ Logger logger;
+ Manager mgr{1};
+ Rooted<SystemTypesystem> sys{new SystemTypesystem(mgr)};
+ // Get the domain.
+ Rooted<Domain> domain {new Domain(mgr, sys, "nasty")};
+ Cardinality any;
+ any.merge(Range<size_t>::typeRangeFrom(0));
+
+ // Our root class A
+ Rooted<StructuredClass> A{new StructuredClass(
+ mgr, "A", domain, any, {nullptr}, {nullptr}, false, true)};
+ domain->addStructuredClass(A);
+ // We also create a field for it.
+ Rooted<FieldDescriptor> A_field{new FieldDescriptor(mgr, A)};
+ A->addFieldDescriptor(A_field);
+
+ // our first transparent child B
+ Rooted<StructuredClass> B{new StructuredClass(
+ mgr, "B", domain, any, {nullptr}, {nullptr}, true)};
+ A_field->addChild(B);
+
+ //TODO: Continue
+}
+
}
}