Test an array with one element

This commit is contained in:
Benoit Blanchon
2014-08-25 10:55:09 +02:00
parent c243417585
commit 3f2b7b706a
4 changed files with 16 additions and 5 deletions

View File

@ -12,7 +12,7 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace JsonGeneratorTests
{
TEST_CLASS(IntentedPrintTests)
TEST_CLASS(Indented_Array_Tests)
{
char buffer[1024];
size_t returnValue;
@ -25,6 +25,15 @@ namespace JsonGeneratorTests
outputMustBe("[]");
}
TEST_METHOD(OneElement)
{
whenInputIs("[1]");
outputMustBe(
"[\n"
" 1\n"
"]");
}
private:
void whenInputIs(const char input[])

View File

@ -12,7 +12,7 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace JsonGeneratorTests
{
TEST_CLASS(IntentedPrintTests)
TEST_CLASS(Indented_Object_Tests)
{
char buffer[1024];
size_t returnValue;

View File

@ -12,7 +12,7 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace JsonGeneratorTests
{
TEST_CLASS(IntentedPrintTests)
TEST_CLASS(Intented_String_Tests)
{
char buffer[1024];
size_t returnValue;