Extracted class IndentedPrintDecorator from PrettyPrintDecorator

This commit is contained in:
Benoit Blanchon
2014-08-26 09:28:41 +02:00
parent d877d77b63
commit 6539c6982c
12 changed files with 128 additions and 31 deletions

View File

@ -76,7 +76,8 @@ namespace JsonGeneratorTests
void whenInputIs(const char input[])
{
StringBuilder sb(buffer, sizeof(buffer));
PrettyPrintDecorator decorator(sb);
IndentedPrintDecorator indentedPrint(sb);
PrettyPrintDecorator decorator(indentedPrint);
returnValue = decorator.print(input);
}

View File

@ -74,7 +74,8 @@ namespace JsonGeneratorTests
void whenInputIs(const char input[])
{
StringBuilder sb(buffer, sizeof(buffer));
PrettyPrintDecorator decorator(sb);
IndentedPrintDecorator indentedPrint(sb);
PrettyPrintDecorator decorator(indentedPrint);
returnValue = decorator.print(input);
}

View File

@ -61,7 +61,8 @@ namespace JsonGeneratorTests
void whenInputIs(const char input[])
{
StringBuilder sb(buffer, sizeof(buffer));
PrettyPrintDecorator decorator(sb);
IndentedPrintDecorator indentedPrint(sb);
PrettyPrintDecorator decorator(indentedPrint);
returnValue = decorator.print(input);
}