From 55487ad668de63c3dad713990a043dc5545717ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Thu, 26 Jun 2014 12:55:40 +0200 Subject: [PATCH] Added a test that appends special chars --- JsonGeneratorTests/StringBuilderTests.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/JsonGeneratorTests/StringBuilderTests.cpp b/JsonGeneratorTests/StringBuilderTests.cpp index 6c4de1d3..54412ac3 100644 --- a/JsonGeneratorTests/StringBuilderTests.cpp +++ b/JsonGeneratorTests/StringBuilderTests.cpp @@ -29,12 +29,18 @@ namespace JsonGeneratorTests assertResultIs(""); } - TEST_METHOD(AppendString) + TEST_METHOD(AppendOneString) { append("ABCD"); assertResultIs("ABCD"); } + TEST_METHOD(AppendSpecialChars) + { + append("\\\"\/\b\f\n\r"); + assertResultIs("\\\"\/\b\f\n\r"); + } + void append(const char* s) { sb->append(s);