Fixed JsonVariant::operator|(int) to accept double (fixes #675)

This commit is contained in:
Benoit Blanchon committed 2018-02-09 09:05:29 +01:00
1 parent cf5396aaed
commit b4eece01f8
3 files changed
+28 -3

No files matched your search

+6
View File
@@ -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;