mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-16 03:52:16 +02:00
Updated copyright year from 2016 to 2017
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright Benoit Blanchon 2014-2016
|
||||
# Copyright Benoit Blanchon 2014-2017
|
||||
# MIT License
|
||||
#
|
||||
# Arduino JSON library
|
||||
|
@ -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:
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
@ -19,7 +19,7 @@ class JsonBufferAllocated {
|
||||
return jsonBuffer->alloc(n);
|
||||
}
|
||||
|
||||
void operator delete(void *, JsonBuffer *) throw() {}
|
||||
void operator delete(void *, JsonBuffer *)throw() {}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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() {}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright Benoit Blanchon 2014-2016
|
||||
# Copyright Benoit Blanchon 2014-2017
|
||||
# MIT License
|
||||
#
|
||||
# Arduino JSON library
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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]
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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*>());
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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());
|
||||
|
@ -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() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
|
@ -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
Reference in New Issue
Block a user