diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-02-12 11:33:01 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-02-12 11:33:01 +0100 |
commit | ebac41111fa33790acce7be45e599f8de37e7f43 (patch) | |
tree | f23a5875d30d28c35e5a8e352856f5f9a9ef7cf2 /test/plugins | |
parent | dbf2eebdd88118dca79045ad0524061f8078e668 (diff) |
Anchors do not have a name anymore and have a unique mapping to their AnnotationEntities. This also makes serialization much easier.
Diffstat (limited to 'test/plugins')
-rw-r--r-- | test/plugins/html/DemoOutputTest.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/test/plugins/html/DemoOutputTest.cpp b/test/plugins/html/DemoOutputTest.cpp index 5006655..2f56e40 100644 --- a/test/plugins/html/DemoOutputTest.cpp +++ b/test/plugins/html/DemoOutputTest.cpp @@ -41,14 +41,11 @@ TEST(DemoHTMLTransformer, writeHTML) Manager mgr{1}; Rooted<SystemTypesystem> sys{new SystemTypesystem(mgr)}; // Get the domains. - Rooted<Domain> bookDom = - constructBookDomain(mgr, sys, logger); + Rooted<Domain> bookDom = constructBookDomain(mgr, sys, logger); Rooted<Domain> headingDom = constructHeadingDomain(mgr, sys, bookDom, logger); - Rooted<Domain> listDom = - constructListDomain(mgr, sys, bookDom, logger); - Rooted<Domain> emDom = - constructEmphasisDomain(mgr, sys, logger); + Rooted<Domain> listDom = constructListDomain(mgr, sys, bookDom, logger); + Rooted<Domain> emDom = constructEmphasisDomain(mgr, sys, logger); // Construct the document. Rooted<Document> doc = constructAdvancedDocument( mgr, logger, bookDom, headingDom, listDom, emDom); @@ -79,10 +76,8 @@ TEST(DemoHTMLTransformer, AnnotationProcessing) Manager mgr{1}; Rooted<SystemTypesystem> sys{new SystemTypesystem(mgr)}; // Get the domains. - Rooted<Domain> bookDom = - constructBookDomain(mgr, sys, logger); - Rooted<Domain> emDom = - constructEmphasisDomain(mgr, sys, logger); + Rooted<Domain> bookDom = constructBookDomain(mgr, sys, logger); + Rooted<Domain> emDom = constructEmphasisDomain(mgr, sys, logger); // Construct a document only containing overlapping annotations. // it has the form: <em>bla<strong>blub</em>bla</strong> Rooted<Document> doc{new Document(mgr, "annotations.oxd")}; @@ -93,13 +88,13 @@ TEST(DemoHTMLTransformer, AnnotationProcessing) Rooted<StructuredEntity> p = buildStructuredEntity(doc, logger, book, {"paragraph"}); ASSERT_TRUE(p != nullptr); - Rooted<Anchor> em_start{new Anchor(mgr, "1", p)}; + Rooted<Anchor> em_start{new Anchor(mgr, p)}; ASSERT_TRUE(addText(logger, doc, p, "bla")); - Rooted<Anchor> strong_start{new Anchor(mgr, "2", p)}; + Rooted<Anchor> strong_start{new Anchor(mgr, p)}; ASSERT_TRUE(addText(logger, doc, p, "blub")); - Rooted<Anchor> em_end{new Anchor(mgr, "3", p)}; + Rooted<Anchor> em_end{new Anchor(mgr, p)}; ASSERT_TRUE(addText(logger, doc, p, "bla")); - Rooted<Anchor> strong_end{new Anchor(mgr, "4", p)}; + Rooted<Anchor> strong_end{new Anchor(mgr, p)}; buildAnnotationEntity(doc, logger, {"emphasized"}, em_start, em_end); buildAnnotationEntity(doc, logger, {"strong"}, strong_start, strong_end); |