mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2026-07-06 16:30:53 +02:00
Tests: avoid adding int to string
This prevents a Clang warning
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
// MIT License
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include <catch.hpp>
|
||||
|
||||
|
||||
static const char* null = 0;
|
||||
|
||||
template <typename T>
|
||||
@@ -176,8 +178,8 @@ TEST_CASE("JsonVariant comparisons") {
|
||||
}
|
||||
|
||||
SECTION("StringInVariant") {
|
||||
JsonVariant variant1 = "0hello" + 1; // make sure they have
|
||||
JsonVariant variant2 = "1hello" + 1; // different addresses
|
||||
JsonVariant variant1 = &"0hello"[1]; // make sure they have
|
||||
JsonVariant variant2 = &"1hello"[1]; // different addresses
|
||||
JsonVariant variant3 = "world";
|
||||
|
||||
REQUIRE(variant1 == variant2);
|
||||
|
||||
Reference in New Issue
Block a user