forked from bblanchon/ArduinoJson
Fixed JsonVariant::operator|(int) to accept double (fixes #675)
This commit is contained in:
1 parent
cf5396aaed
commit
b4eece01f8
3 files changed
+28
-3
No files matched your search
@@ -51,6 +51,12 @@ TEST_CASE("JsonVariant::operator|()") {
|
||||
REQUIRE(result == 0);
|
||||
}
|
||||
|
||||
SECTION("double | int") {
|
||||
JsonVariant variant = 42.0;
|
||||
int result = variant | 666;
|
||||
REQUIRE(result == 42);
|
||||
}
|
||||
|
||||
SECTION("bool | bool") {
|
||||
JsonVariant variant = false;
|
||||
bool result = variant | true;
|
||||
|
||||
Reference in new issue
Block a user