1 /* 2 * Copyright 2017, Andrew Lindesay <apl@lindesay.co.nz> 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef JSON_END_TO_END_TEST_H 6 #define JSON_END_TO_END_TEST_H 7 8 9 #include <TestCase.h> 10 #include <TestSuite.h> 11 12 13 class Sample; 14 15 16 class JsonEndToEndTest : public CppUnit::TestCase { 17 public: 18 JsonEndToEndTest(); 19 virtual ~JsonEndToEndTest(); 20 21 void TestNullA(); 22 void TestTrueA(); 23 void TestFalseA(); 24 void TestNumberA(); 25 void TestStringA(); 26 void TestStringA2(); 27 void TestStringB(); 28 void TestArrayA(); 29 void TestArrayB(); 30 void TestObjectA(); 31 32 void TestStringUnterminated(); 33 void TestArrayUnterminated(); 34 void TestObjectUnterminated(); 35 36 static void AddTests(BTestSuite& suite); 37 private: 38 void TestUnterminated(const char* input); 39 40 void TestParseAndWrite(const char* input, 41 const char* expectedOutput); 42 }; 43 44 45 #endif // JSON_END_TO_END_TEST_H 46