macros.cpp 451 B

123456789101112131415161718
  1. // ArduinoJson - https://arduinojson.org
  2. // Copyright © 2014-2024, Benoit BLANCHON
  3. // MIT License
  4. #include <ArduinoJson.h>
  5. #include <catch.hpp>
  6. TEST_CASE("JSON_ARRAY_SIZE") {
  7. REQUIRE(JSON_ARRAY_SIZE(10) == ArduinoJson::detail::sizeofArray(10));
  8. }
  9. TEST_CASE("JSON_OBJECT_SIZE") {
  10. REQUIRE(JSON_OBJECT_SIZE(10) == ArduinoJson::detail::sizeofObject(10));
  11. }
  12. TEST_CASE("JSON_STRING_SIZE") {
  13. REQUIRE(JSON_STRING_SIZE(10) == 11); // issue #2054
  14. }