mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-29 18:27:37 +02:00
@ -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