From 5c119099f3058fe1656b876d9251f7b5482e593c Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Tue, 24 Jun 2014 21:09:25 +0200 Subject: [PATCH] Generator: added a test of an array with too many numbers --- JsonGeneratorTests/JsonArrayTests.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/JsonGeneratorTests/JsonArrayTests.cpp b/JsonGeneratorTests/JsonArrayTests.cpp index b810564f..941b099f 100644 --- a/JsonGeneratorTests/JsonArrayTests.cpp +++ b/JsonGeneratorTests/JsonArrayTests.cpp @@ -55,6 +55,15 @@ namespace JsonGeneratorTests 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) { char buffer[256];