From a11eccab7f53860415ff1a8cd0e843eb8de84898 Mon Sep 17 00:00:00 2001 From: DieSlower Date: Sat, 19 Jan 2019 16:48:12 -0500 Subject: [PATCH] Issue #96 Adds the TestJsonValueType test --- Tests/TrUtil/JsonTests.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Tests/TrUtil/JsonTests.cpp b/Tests/TrUtil/JsonTests.cpp index 078491d..fde55b4 100644 --- a/Tests/TrUtil/JsonTests.cpp +++ b/Tests/TrUtil/JsonTests.cpp @@ -21,6 +21,10 @@ #include "JsonTests.h" +#include + +#include + #include ////////////////////////////////////////////////////////////////////////// @@ -32,3 +36,35 @@ JsonTests::JsonTests() JsonTests::~JsonTests() { } + +//enum ValueType +//{ +// NullValue = Json::ValueType::nullValue, ///'null' value +// IntValue = Json::ValueType::intValue, ///signed integer value +// UintValue = Json::ValueType::uintValue, ///unsigned integer value +// RealValue = Json::ValueType::realValue, ///double value +// StringValue = Json::ValueType::stringValue, ///UTF-8 string value +// BooleanValue = Json::ValueType::booleanValue, ///bool value +// ArrayValue = Json::ValueType::arrayValue, ///array value (ordered list) +// ObjectValue = Json::ValueType::objectValue ///object value (collection of name/value pairs). +//}; + +/** + * @fn TEST_F(JsonTests, TestJsonValueType) + * + * @brief Constructor. + * + * @param parameter1 The first parameter. + * @param parameter2 The second parameter. + */ +TEST_F(JsonTests, TestJsonValueType) +{ + EXPECT_EQ(Json::ValueType::nullValue, 0); + EXPECT_EQ(Json::ValueType::intValue, 1); + EXPECT_EQ(Json::ValueType::uintValue, 2); + EXPECT_EQ(Json::ValueType::realValue, 3); + EXPECT_EQ(Json::ValueType::stringValue, 4); + EXPECT_EQ(Json::ValueType::booleanValue, 5); + EXPECT_EQ(Json::ValueType::arrayValue, 6); + EXPECT_EQ(Json::ValueType::objectValue, 7); +} \ No newline at end of file