Fix build on Visual Studio 2010, 2012, MinGW32 and GCC 5

This commit is contained in:
Benoit Blanchon
2016-02-06 21:21:34 +01:00
parent 5f589d3836
commit 428dddf2cc
11 changed files with 106 additions and 105 deletions

View File

@ -5,8 +5,8 @@
// https://github.com/bblanchon/ArduinoJson
// If you like this project, please add a star!
#include <gtest/gtest.h>
#include <ArduinoJson.h>
#include <gtest/gtest.h>
#include <stdint.h>
class JsonArray_Subscript_Tests : public ::testing::Test {
@ -33,12 +33,14 @@ TEST_(StoreInteger) {
EXPECT_FALSE(_array[0].is<double>());
}
TEST_(StoreInt64) {
#if ARDUINOJSON_USE_LONG_LONG || ARDUINOJSON_USE_INT64
TEST_(StoreLongLong) {
_array[0] = 9223372036854775807;
EXPECT_EQ(9223372036854775807, _array[0].as<int64_t>());
EXPECT_EQ(9223372036854775807, _array[0].as<long long>());
EXPECT_TRUE(_array[0].is<int>());
EXPECT_FALSE(_array[0].is<double>());
}
#endif
TEST_(StoreDouble) {
_array[0] = 123.45;