From 1a31767dcf9e4bcbc2d2d7bdbf409df392597b92 Mon Sep 17 00:00:00 2001 From: "Philipp A. Hartmann" Date: Thu, 30 Oct 2014 19:23:57 +0100 Subject: [PATCH] DocumentMove tests: compiler error due to -Wsign-compare On GCC 4.9, the documenttest.cpp fails to compile in C++11 mode, as the MoveConstructor/Assignment tests contain left-over comparisons between signed and unsigned expressions. --- test/unittest/documenttest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unittest/documenttest.cpp b/test/unittest/documenttest.cpp index 1542434..f5e1b50 100644 --- a/test/unittest/documenttest.cpp +++ b/test/unittest/documenttest.cpp @@ -313,7 +313,7 @@ TYPED_TEST(DocumentMove, MoveConstructorStack) { GenericStringStream is("[\"one\", \"two\", \"three\"]"); reader.template Parse(is, a); size_t capacity = a.GetStackCapacity(); - EXPECT_GT(capacity, 0); + EXPECT_GT(capacity, 0u); Document b(std::move(a)); EXPECT_EQ(a.GetStackCapacity(), defaultCapacity); @@ -405,7 +405,7 @@ TYPED_TEST(DocumentMove, MoveAssignmentStack) { GenericStringStream is("[\"one\", \"two\", \"three\"]"); reader.template Parse(is, a); size_t capacity = a.GetStackCapacity(); - EXPECT_GT(capacity, 0); + EXPECT_GT(capacity, 0u); Document b; b = std::move(a);