changeset 407:25ef13e25338

Json: remove undefined, not part of JSON spec
author David Demelier <markand@malikania.fr>
date Tue, 06 Oct 2015 09:05:53 +0200
parents d485d36a8de1
children f083259de5e6
files C++/modules/Json/Json.h C++/tests/Json/main.cpp
diffstat 2 files changed, 3 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/C++/modules/Json/Json.h	Mon Oct 05 20:24:48 2015 +0200
+++ b/C++/modules/Json/Json.h	Tue Oct 06 09:05:53 2015 +0200
@@ -48,8 +48,7 @@
 	Real,		//!< Value is float
 	Object,		//!< Value is object {}
 	String,		//!< Value is unicode string
-	Null,		//!< Value is defined to null
-	Undefined	//!< Value is undefined
+	Null		//!< Value is defined to null
 };
 
 /**
@@ -101,10 +100,10 @@
 
 public:
 	/**
-	 * Construct an undefined value.
+	 * Construct a null value.
 	 */
 	inline Value() noexcept
-		: m_type{Type::Undefined}
+		: m_type{Type::Null}
 	{
 	}
 
@@ -467,16 +466,6 @@
 	}
 
 	/**
-	 * Check if the value is undefined type.
-	 *
-	 * @return true if undefined
-	 */
-	inline bool isUndefined() const noexcept
-	{
-		return m_type == Type::Undefined;
-	}
-
-	/**
 	 * Check if the value is string type.
 	 *
 	 * @return true if string
--- a/C++/tests/Json/main.cpp	Mon Oct 05 20:24:48 2015 +0200
+++ b/C++/tests/Json/main.cpp	Tue Oct 06 09:05:53 2015 +0200
@@ -83,17 +83,6 @@
  * json::Value constructors
  * -------------------------------------------------------- */
 
-TEST(Constructors, undefined)
-{
-	try {
-		json::Value value;
-
-		ASSERT_TRUE(value.isUndefined());
-	} catch (const json::Error &ex) {
-		FAIL() << ex.what();
-	}
-}
-
 TEST(Constructors, null)
 {
 	try {