diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/core/model/DomainTest.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/core/model/DomainTest.cpp b/test/core/model/DomainTest.cpp index d22c845..dae3ba4 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(0, 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(book); + // 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 +} + } } |