Added macros ARDUINOJSON_VERSION, ARDUINOJSON_VERSION_MAJOR...

This commit is contained in:
Benoit Blanchon
2018-06-01 09:16:45 +02:00
parent 7c0af91844
commit eb20ae6a3f
5 changed files with 30 additions and 0 deletions

16
test/Misc/version.cpp Normal file
View File

@ -0,0 +1,16 @@
// ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2018
// MIT License
#include <ArduinoJson/version.hpp>
#include <catch.hpp>
#include <sstream>
TEST_CASE("ARDUINOJSON_VERSION") {
std::stringstream version;
version << ARDUINOJSON_VERSION_MAJOR << "." << ARDUINOJSON_VERSION_MINOR
<< "." << ARDUINOJSON_VERSION_REVISION;
REQUIRE(version.str() == ARDUINOJSON_VERSION);
}