/// // Copyright (c) 2015 David White [email protected] // Subject to the MIT License, http://opensource.org/licenses/MIT // #include <catch.hpp> //#include <miio.h> #include <json/Json.h> using namespace miio; SCENARIO( "Json Values of all types can be instantitated", "[json]" ) { GIVEN ("no parameters") { json::Value value; THEN("a json Null value is created") { REQUIRE(value.IsNull()); } } GIVEN ("a boolean") { json::Value value(true); THEN("a json Bool value is created") { REQUIRE(value.IsBool()); } } GIVEN("a std::string") { json::Value value(std::string("A std::string.")); THEN("a json String value is created") { REQUIRE(value.IsString()); REQUIRE(value.AsString()=="A std::string."); }