Files
ArduinoJson/JsonGeneratorTests/JsonHashTableTests.cpp

30 lines
571 B
C++
Raw Normal View History

2014-06-27 13:00:27 +02:00
#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);
}
};
}