mirror of
				https://github.com/Tencent/rapidjson.git
				synced 2025-10-27 19:10:24 +01:00 
			
		
		
		
	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.
This commit is contained in:
		| @@ -313,7 +313,7 @@ TYPED_TEST(DocumentMove, MoveConstructorStack) { | |||||||
|     GenericStringStream<Encoding> is("[\"one\", \"two\", \"three\"]"); |     GenericStringStream<Encoding> is("[\"one\", \"two\", \"three\"]"); | ||||||
|     reader.template Parse<kParseDefaultFlags>(is, a); |     reader.template Parse<kParseDefaultFlags>(is, a); | ||||||
|     size_t capacity = a.GetStackCapacity(); |     size_t capacity = a.GetStackCapacity(); | ||||||
|     EXPECT_GT(capacity, 0); |     EXPECT_GT(capacity, 0u); | ||||||
|  |  | ||||||
|     Document b(std::move(a)); |     Document b(std::move(a)); | ||||||
|     EXPECT_EQ(a.GetStackCapacity(), defaultCapacity); |     EXPECT_EQ(a.GetStackCapacity(), defaultCapacity); | ||||||
| @@ -405,7 +405,7 @@ TYPED_TEST(DocumentMove, MoveAssignmentStack) { | |||||||
|     GenericStringStream<Encoding> is("[\"one\", \"two\", \"three\"]"); |     GenericStringStream<Encoding> is("[\"one\", \"two\", \"three\"]"); | ||||||
|     reader.template Parse<kParseDefaultFlags>(is, a); |     reader.template Parse<kParseDefaultFlags>(is, a); | ||||||
|     size_t capacity = a.GetStackCapacity(); |     size_t capacity = a.GetStackCapacity(); | ||||||
|     EXPECT_GT(capacity, 0); |     EXPECT_GT(capacity, 0u); | ||||||
|  |  | ||||||
|     Document b; |     Document b; | ||||||
|     b = std::move(a); |     b = std::move(a); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Philipp A. Hartmann
					Philipp A. Hartmann