mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 12:32:17 +02:00
32 lines
633 B
C++
32 lines
633 B
C++
![]() |
#include "CppUnitTest.h"
|
||
|
#include "StringBuilder.h"
|
||
|
|
||
|
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||
|
|
||
|
namespace JsonGeneratorTests
|
||
|
{
|
||
|
TEST_CLASS(StringBuilderTests)
|
||
|
{
|
||
|
char buffer[16];
|
||
|
StringBuilder* sb;
|
||
|
|
||
|
|
||
|
public:
|
||
|
|
||
|
TEST_METHOD_INITIALIZE(Initialize)
|
||
|
{
|
||
|
sb = new StringBuilder(buffer, sizeof(buffer));
|
||
|
}
|
||
|
|
||
|
TEST_METHOD(InitialState)
|
||
|
{
|
||
|
assertResultIs("");
|
||
|
}
|
||
|
|
||
|
|
||
|
void assertResultIs(const char* expected)
|
||
|
{
|
||
|
Assert::AreEqual(expected, buffer);
|
||
|
}
|
||
|
};
|
||
|
}
|