Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MJPA/SimpleJSON.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/demo/testcases.cpp')
-rw-r--r--src/demo/testcases.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/demo/testcases.cpp b/src/demo/testcases.cpp
index 5fe28a5..a73c20b 100644
--- a/src/demo/testcases.cpp
+++ b/src/demo/testcases.cpp
@@ -177,5 +177,18 @@ void run_tests()
}
print_out(test_output.c_str());
+ // Test case for int initialisation of JSONValue.
+ test_output = wstring(L"| Testing JSONValue int initialisation") + wstring(DESC_LENGTH - 36, L' ') + wstring(L" | ");
+ JSONValue int_test = JSONValue(42);
+ if (int_test.Stringify() == L"42")
+ {
+ test_output += wstring(L"passed |\r\n");
+ }
+ else
+ {
+ test_output += wstring(L"failed |\r\n");
+ }
+ print_out(test_output.c_str());
+
print_out(vert_sep.c_str());
}