diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-11 13:53:15 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-11 13:53:15 +0100 |
commit | 6940aa0e6837f9d83f9b5c5b37d4fd7747c95c67 (patch) | |
tree | 75d0944ff4fd1754f2db55b081588c71482efd71 /test/core | |
parent | e6a7bbd753cba97f7bda154341d93d3f1241d2c4 (diff) |
Forward declaring Rtti stuff for fewer dependencies in the Rtti.hpp header
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/model/DocumentTest.cpp | 14 | ||||
-rw-r--r-- | test/core/model/NodeTest.cpp | 1 |
2 files changed, 9 insertions, 6 deletions
diff --git a/test/core/model/DocumentTest.cpp b/test/core/model/DocumentTest.cpp index 2d53dcd..d11bb78 100644 --- a/test/core/model/DocumentTest.cpp +++ b/test/core/model/DocumentTest.cpp @@ -20,6 +20,8 @@ #include <iostream> +#include <core/common/Rtti.hpp> + #include <core/model/Document.hpp> #include <core/model/Domain.hpp> @@ -47,7 +49,7 @@ TEST(Document, testDocumentConstruction) ASSERT_FALSE(root.isNull()); ASSERT_EQ("book", root->getDescriptor()->getName()); ASSERT_TRUE(root->hasField()); - ASSERT_EQ(2, root->getField().size()); + ASSERT_EQ(2U, root->getField().size()); // get foreword (paragraph) { Rooted<StructuredEntity> foreword = root->getField()[0]; @@ -55,7 +57,7 @@ TEST(Document, testDocumentConstruction) ASSERT_EQ("paragraph", foreword->getDescriptor()->getName()); // it should contain one text node ASSERT_TRUE(foreword->hasField()); - ASSERT_EQ(1, foreword->getField().size()); + ASSERT_EQ(1U, foreword->getField().size()); // which in turn should have a primitive content field containing the // right text. { @@ -63,7 +65,7 @@ TEST(Document, testDocumentConstruction) ASSERT_FALSE(text.isNull()); ASSERT_EQ("text", text->getDescriptor()->getName()); ASSERT_TRUE(text->hasField()); - ASSERT_EQ(1, text->getField().size()); + ASSERT_EQ(1U, text->getField().size()); ASSERT_TRUE(text->getField()[0]->isa(typeOf<DocumentPrimitive>())); Variant content = text->getField()[0].cast<DocumentPrimitive>()->getContent(); @@ -77,14 +79,14 @@ TEST(Document, testDocumentConstruction) ASSERT_EQ("section", section->getDescriptor()->getName()); // it should contain one paragraph ASSERT_TRUE(section->hasField()); - ASSERT_EQ(1, section->getField().size()); + ASSERT_EQ(1U, section->getField().size()); { Rooted<StructuredEntity> par = section->getField()[0]; ASSERT_FALSE(par.isNull()); ASSERT_EQ("paragraph", par->getDescriptor()->getName()); // it should contain one text node ASSERT_TRUE(par->hasField()); - ASSERT_EQ(1, par->getField().size()); + ASSERT_EQ(1U, par->getField().size()); // which in turn should have a primitive content field containing // the // right text. @@ -93,7 +95,7 @@ TEST(Document, testDocumentConstruction) ASSERT_FALSE(text.isNull()); ASSERT_EQ("text", text->getDescriptor()->getName()); ASSERT_TRUE(text->hasField()); - ASSERT_EQ(1, text->getField().size()); + ASSERT_EQ(1U, text->getField().size()); ASSERT_TRUE( text->getField()[0]->isa(typeOf<DocumentPrimitive>())); Variant content = diff --git a/test/core/model/NodeTest.cpp b/test/core/model/NodeTest.cpp index 3bfa31b..7300d0c 100644 --- a/test/core/model/NodeTest.cpp +++ b/test/core/model/NodeTest.cpp @@ -18,6 +18,7 @@ #include <gtest/gtest.h> +#include <core/common/Rtti.hpp> #include <core/managed/Managed.hpp> #include <core/model/Node.hpp> |