From 6940aa0e6837f9d83f9b5c5b37d4fd7747c95c67 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 11 Jan 2015 13:53:15 +0100 Subject: Forward declaring Rtti stuff for fewer dependencies in the Rtti.hpp header --- test/core/model/DocumentTest.cpp | 14 ++++++++------ test/core/model/NodeTest.cpp | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'test/core') 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 +#include + #include #include @@ -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 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())); Variant content = text->getField()[0].cast()->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 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())); 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 +#include #include #include -- cgit v1.2.3