mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 12:32:17 +02:00
Generator: added empty array test
This commit is contained in:
22
JsonGeneratorTests/JsonArrayTests.cpp
Normal file
22
JsonGeneratorTests/JsonArrayTests.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include "CppUnitTest.h"
|
||||
#include "JsonArray.h"
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
|
||||
namespace JsonGeneratorTests
|
||||
{
|
||||
TEST_CLASS(JsonArrayTests)
|
||||
{
|
||||
public:
|
||||
|
||||
TEST_METHOD(EmptyArray)
|
||||
{
|
||||
JsonArray arr;
|
||||
|
||||
char buffer[256];
|
||||
arr.writeTo(buffer, sizeof(buffer));
|
||||
|
||||
Assert::AreEqual("[]", buffer);
|
||||
}
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user