Generator: added a test of an array with too many numbers

This commit is contained in:
Benoit Blanchon
2014-06-24 21:09:25 +02:00
parent bb705bab63
commit 5c119099f3

View File

@ -55,6 +55,15 @@ namespace JsonGeneratorTests
AssertJsonIs("[3.14,2.72]"); AssertJsonIs("[3.14,2.72]");
} }
TEST_METHOD(AddOneNumberOverCapacity)
{
arr.add(3.14);
arr.add(2.72);
arr.add(1.41);
AssertJsonIs("[3.14,2.72]");
}
void AssertJsonIs(const char* expected) void AssertJsonIs(const char* expected)
{ {
char buffer[256]; char buffer[256];