Updated copyright year from 2016 to 2017

This commit is contained in:
Benoit Blanchon
2017-01-06 21:07:34 +01:00
parent 7e7074502f
commit 671329a3e9
139 changed files with 365 additions and 235 deletions

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
# Copyright Benoit Blanchon 2014-2016
# Copyright Benoit Blanchon 2014-2017
# MIT License
#
# Arduino JSON library

View File

@ -1,7 +1,7 @@
The MIT License (MIT)
---------------------
Copyright © 2014-2016 Benoit BLANCHON
Copyright © 2014-2017 Benoit BLANCHON
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,7 +1,7 @@
// Sample Arduino Json Web Client
// Downloads and parse http://jsonplaceholder.typicode.com/users/1
//
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -3,11 +3,11 @@
// You can easily test this program with netcat:
// $ nc -ulp 8888
//
// by Benoit Blanchon, MIT License 2015-2016
// by Benoit Blanchon, MIT License 2015-2017
#include <SPI.h>
#include <Ethernet.h>
#include <ArduinoJson.h>
#include <Ethernet.h>
#include <SPI.h>
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress localIp(192, 168, 0, 177);

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
@ -18,8 +18,12 @@ class ListConstIterator {
public:
explicit ListConstIterator(const ListNode<T> *node = NULL) : _node(node) {}
const T &operator*() const { return _node->content; }
const T *operator->() { return &_node->content; }
const T &operator*() const {
return _node->content;
}
const T *operator->() {
return &_node->content;
}
bool operator==(const ListConstIterator<T> &other) const {
return _node == other._node;

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
@ -7,8 +7,8 @@
#pragma once
#include "ListNode.hpp"
#include "ListConstIterator.hpp"
#include "ListNode.hpp"
namespace ArduinoJson {
namespace Internals {
@ -19,8 +19,12 @@ class ListIterator {
public:
explicit ListIterator(ListNode<T> *node = NULL) : _node(node) {}
T &operator*() const { return _node->content; }
T *operator->() { return &_node->content; }
T &operator*() const {
return _node->content;
}
T *operator->() {
return &_node->content;
}
bool operator==(const ListIterator<T> &other) const {
return _node == other._node;
@ -35,7 +39,9 @@ class ListIterator {
return *this;
}
operator ListConstIterator<T>() const { return ListConstIterator<T>(_node); }
operator ListConstIterator<T>() const {
return ListConstIterator<T>(_node);
}
private:
ListNode<T> *_node;

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
@ -19,7 +19,9 @@ class ReferenceType {
return this == &other;
}
bool operator!=(const ReferenceType& other) const { return this != &other; }
bool operator!=(const ReferenceType& other) const {
return this != &other;
}
protected:
ReferenceType() {}

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
@ -15,7 +15,9 @@ namespace Internals {
// A dummy Print implementation used in JsonPrintable::measureLength()
class DummyPrint : public Print {
public:
virtual size_t write(uint8_t) { return 1; }
virtual size_t write(uint8_t) {
return 1;
}
};
}
}

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
# Copyright Benoit Blanchon 2014-2016
# Copyright Benoit Blanchon 2014-2017
# MIT License
#
# Arduino JSON library

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
TEST(DynamicJsonBuffer_Array_Tests, GrowsWithArray) {
DynamicJsonBuffer jsonBuffer;

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
TEST(DynamicJsonBuffer_Object_Tests, GrowsWithObject) {
DynamicJsonBuffer json;

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
class GbathreeBug : public testing::Test {
public:
@ -34,37 +34,61 @@ class GbathreeBug : public testing::Test {
}
};
TEST_F(GbathreeBug, Success) { EXPECT_TRUE(_object.success()); }
TEST_F(GbathreeBug, Success) {
EXPECT_TRUE(_object.success());
}
TEST_F(GbathreeBug, ProtocolName) {
EXPECT_STREQ("fluorescence", _object["protocol_name"]);
}
TEST_F(GbathreeBug, Repeats) { EXPECT_EQ(1, _object["repeats"]); }
TEST_F(GbathreeBug, Repeats) {
EXPECT_EQ(1, _object["repeats"]);
}
TEST_F(GbathreeBug, Wait) { EXPECT_EQ(0, _object["wait"]); }
TEST_F(GbathreeBug, Wait) {
EXPECT_EQ(0, _object["wait"]);
}
TEST_F(GbathreeBug, Measurements) { EXPECT_EQ(3, _object["measurements"]); }
TEST_F(GbathreeBug, Measurements) {
EXPECT_EQ(3, _object["measurements"]);
}
TEST_F(GbathreeBug, Meas2_Light) { EXPECT_EQ(15, _object["meas2_light"]); }
TEST_F(GbathreeBug, Meas2_Light) {
EXPECT_EQ(15, _object["meas2_light"]);
}
TEST_F(GbathreeBug, Meas1_Baseline) { EXPECT_EQ(0, _object["meas1_baseline"]); }
TEST_F(GbathreeBug, Meas1_Baseline) {
EXPECT_EQ(0, _object["meas1_baseline"]);
}
TEST_F(GbathreeBug, Act_Light) { EXPECT_EQ(20, _object["act_light"]); }
TEST_F(GbathreeBug, Act_Light) {
EXPECT_EQ(20, _object["act_light"]);
}
TEST_F(GbathreeBug, Pulsesize) { EXPECT_EQ(25, _object["pulsesize"]); }
TEST_F(GbathreeBug, Pulsesize) {
EXPECT_EQ(25, _object["pulsesize"]);
}
TEST_F(GbathreeBug, Pulsedistance) {
EXPECT_EQ(10000, _object["pulsedistance"]);
}
TEST_F(GbathreeBug, Actintensity1) { EXPECT_EQ(50, _object["actintensity1"]); }
TEST_F(GbathreeBug, Actintensity1) {
EXPECT_EQ(50, _object["actintensity1"]);
}
TEST_F(GbathreeBug, Actintensity2) { EXPECT_EQ(255, _object["actintensity2"]); }
TEST_F(GbathreeBug, Actintensity2) {
EXPECT_EQ(255, _object["actintensity2"]);
}
TEST_F(GbathreeBug, Measintensity) { EXPECT_EQ(255, _object["measintensity"]); }
TEST_F(GbathreeBug, Measintensity) {
EXPECT_EQ(255, _object["measintensity"]);
}
TEST_F(GbathreeBug, Calintensity) { EXPECT_EQ(255, _object["calintensity"]); }
TEST_F(GbathreeBug, Calintensity) {
EXPECT_EQ(255, _object["calintensity"]);
}
TEST_F(GbathreeBug, Pulses) {
// "pulses":[50,50,50]

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
class IntegrationTests : public testing::TestWithParam<const char*> {
static const size_t MAX_JSON_SIZE = 10000;

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
struct Person {
int id;

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
class Issue34 : public testing::Test {
protected:
@ -23,18 +23,34 @@ class Issue34 : public testing::Test {
}
};
TEST_F(Issue34, int8_t) { test_with_value<int8_t>(1); }
TEST_F(Issue34, int8_t) {
test_with_value<int8_t>(1);
}
TEST_F(Issue34, uint8_t) { test_with_value<uint8_t>(2); }
TEST_F(Issue34, uint8_t) {
test_with_value<uint8_t>(2);
}
TEST_F(Issue34, int16_t) { test_with_value<int16_t>(3); }
TEST_F(Issue34, int16_t) {
test_with_value<int16_t>(3);
}
TEST_F(Issue34, uint16_t) { test_with_value<uint16_t>(4); }
TEST_F(Issue34, uint16_t) {
test_with_value<uint16_t>(4);
}
TEST_F(Issue34, int32_t) { test_with_value<int32_t>(5); }
TEST_F(Issue34, int32_t) {
test_with_value<int32_t>(5);
}
TEST_F(Issue34, uint32_t) { test_with_value<uint32_t>(6); }
TEST_F(Issue34, uint32_t) {
test_with_value<uint32_t>(6);
}
TEST_F(Issue34, float) { test_with_value<float>(7); }
TEST_F(Issue34, float) {
test_with_value<float>(7);
}
TEST_F(Issue34, double) { test_with_value<double>(8); }
TEST_F(Issue34, double) {
test_with_value<double>(8);
}

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
@ -20,10 +20,18 @@ static const char* superLong =
static const JsonVariant variant = RawJson(superLong);
TEST(SUITE, IsNotALong) { ASSERT_FALSE(variant.is<long>()); }
TEST(SUITE, IsNotALong) {
ASSERT_FALSE(variant.is<long>());
}
TEST(SUITE, AsLong) { ASSERT_EQ(LONG_MAX, variant.as<long>()); }
TEST(SUITE, AsLong) {
ASSERT_EQ(LONG_MAX, variant.as<long>());
}
TEST(SUITE, IsAString) { ASSERT_FALSE(variant.is<const char*>()); }
TEST(SUITE, IsAString) {
ASSERT_FALSE(variant.is<const char*>());
}
TEST(SUITE, AsString) { ASSERT_STREQ(superLong, variant.as<const char*>()); }
TEST(SUITE, AsString) {
ASSERT_STREQ(superLong, variant.as<const char*>());
}

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
class JsonArray_Add_Tests : public ::testing::Test {
protected:

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
#define TEST_(name) TEST(JsonArray_Basic_Tests, name)

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
TEST(JsonArray_Invalid_Tests, SubscriptFails) {
ASSERT_FALSE(JsonArray::invalid()[0].success());

View File

@ -1,12 +1,12 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library
// 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>
template <typename TIterator>
static void run_iterator_test() {

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

View File

@ -1,4 +1,4 @@
// Copyright Benoit Blanchon 2014-2016
// Copyright Benoit Blanchon 2014-2017
// MIT License
//
// Arduino JSON library

Some files were not shown because too many files have changed in this diff Show More