mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 12:32:17 +02:00
Avoid Arduino.h
when all its features are disabled (fixes #1692)
This commit is contained in:
committed by
Benoit Blanchon
parent
ada1f2a894
commit
ec7ffa20f2
20
extras/tests/Misc/NoArduinoHeader.cpp
Normal file
20
extras/tests/Misc/NoArduinoHeader.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
// ArduinoJson - https://arduinojson.org
|
||||
// Copyright Benoit Blanchon 2014-2021
|
||||
// MIT License
|
||||
|
||||
#define ARDUINO 1
|
||||
#define ARDUINOJSON_ENABLE_PROGMEM 0
|
||||
#define ARDUINOJSON_ENABLE_ARDUINO_STRING 0
|
||||
#define ARDUINOJSON_ENABLE_ARDUINO_STREAM 0
|
||||
#define ARDUINOJSON_ENABLE_ARDUINO_PRINT 0
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include <catch.hpp>
|
||||
|
||||
TEST_CASE("Arduino.h") {
|
||||
#ifdef ARDUINO_H_INCLUDED
|
||||
FAIL("Arduino.h should not be included");
|
||||
#else
|
||||
INFO("Arduino.h not included");
|
||||
#endif
|
||||
}
|
Reference in New Issue
Block a user