Fixed return type of JsonArray::is<T>() and some others (issue #121)

This commit is contained in:
Benoit Blanchon
2015-09-19 16:25:18 +02:00
parent 155dd653e7
commit 7cf6fe6d62
7 changed files with 19 additions and 4 deletions

View File

@ -39,11 +39,13 @@ class JsonArray_Container_Tests : public ::testing::Test {
private:
template <typename T>
void itemMustEqual(int index, T expected) {
EXPECT_TRUE(_array[index].is<T>());
EXPECT_EQ(expected, _array[index].as<T>());
}
template <typename T>
void itemMustReference(int index, const T& expected) {
EXPECT_TRUE(_array[index].is<T&>());
EXPECT_EQ(&expected, &_array[index].as<T&>());
}
};