Small (and hopefully working) delay at startup added to avoid boot-loop at startup.pull/109/head
parent
5545c8a359
commit
49e8def8ee
@ -0,0 +1,29 @@ |
|||||||
|
# ArduinoJson - https://arduinojson.org |
||||||
|
# Copyright Benoit Blanchon 2014-2021 |
||||||
|
# MIT License |
||||||
|
|
||||||
|
if(MSVC_VERSION LESS 1910) |
||||||
|
return() |
||||||
|
endif() |
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10) |
||||||
|
return() |
||||||
|
endif() |
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10) |
||||||
|
return() |
||||||
|
endif() |
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20) |
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON) |
||||||
|
|
||||||
|
add_executable(Cpp20Tests |
||||||
|
smoke_test.cpp |
||||||
|
) |
||||||
|
|
||||||
|
add_test(Cpp20 Cpp20Tests) |
||||||
|
|
||||||
|
set_tests_properties(Cpp20 |
||||||
|
PROPERTIES |
||||||
|
LABELS "Catch" |
||||||
|
) |
@ -0,0 +1,15 @@ |
|||||||
|
#include <ArduinoJson.h> |
||||||
|
|
||||||
|
#include <catch.hpp> |
||||||
|
#include <string> |
||||||
|
|
||||||
|
TEST_CASE("C++20 smoke test") { |
||||||
|
StaticJsonDocument<128> doc; |
||||||
|
|
||||||
|
deserializeJson(doc, "{\"hello\":\"world\"}"); |
||||||
|
REQUIRE(doc["hello"] == "world"); |
||||||
|
|
||||||
|
std::string json; |
||||||
|
serializeJson(doc, json); |
||||||
|
REQUIRE(json == "{\"hello\":\"world\"}"); |
||||||
|
} |
Loading…
Reference in new issue