forked from bblanchon/ArduinoJson
@ -140,6 +140,13 @@ TEST_CASE("volatile") {
|
||||
JsonDocument doc;
|
||||
JsonVariant variant = doc.to<JsonVariant>();
|
||||
|
||||
SECTION("volatile bool") { // issue #2029
|
||||
volatile bool f = true;
|
||||
variant.set(f);
|
||||
CHECK(variant.is<bool>() == true);
|
||||
CHECK(variant.as<bool>() == true);
|
||||
}
|
||||
|
||||
SECTION("volatile int") {
|
||||
volatile int f = 42;
|
||||
variant.set(f);
|
||||
|
Reference in New Issue
Block a user