Added support of long long (issue #171)

This commit is contained in:
Benoit Blanchon
2016-02-01 21:17:32 +01:00
parent ce63e9c3c3
commit ed4ec6ed2e
51 changed files with 845 additions and 806 deletions

View File

@ -6,8 +6,8 @@
// If you like this project, please add a star!
#include <gtest/gtest.h>
#define ARDUINOJSON_ENABLE_STD_STREAM
#include <ArduinoJson.h>
#include <stdint.h>
class JsonArray_Subscript_Tests : public ::testing::Test {
protected:
@ -33,6 +33,13 @@ TEST_(StoreInteger) {
EXPECT_FALSE(_array[0].is<double>());
}
TEST_(StoreInt64) {
_array[0] = 9223372036854775807;
EXPECT_EQ(9223372036854775807, _array[0].as<int64_t>());
EXPECT_TRUE(_array[0].is<int>());
EXPECT_FALSE(_array[0].is<double>());
}
TEST_(StoreDouble) {
_array[0] = 123.45;
EXPECT_EQ(123.45, _array[0].as<double>());