mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 04:22:18 +02:00
30 lines
571 B
C++
30 lines
571 B
C++
![]() |
#include "CppUnitTest.h"
|
||
|
#include "JsonHashTable.h"
|
||
|
|
||
|
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||
|
|
||
|
namespace JsonGeneratorTests
|
||
|
{
|
||
|
TEST_CLASS(JsonHashTableTests)
|
||
|
{
|
||
|
JsonHashTable<2> hash;
|
||
|
|
||
|
public:
|
||
|
|
||
|
TEST_METHOD(Empty)
|
||
|
{
|
||
|
assertJsonIs("{}");
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
|
||
|
void assertJsonIs(const char* expected)
|
||
|
{
|
||
|
char buffer[256];
|
||
|
|
||
|
hash.writeTo(buffer, sizeof(buffer));
|
||
|
|
||
|
Assert::AreEqual(expected, buffer);
|
||
|
}
|
||
|
};
|
||
|
}
|