From 380b36be3352cd9a5c93dbd67db25346166a8547 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 11 Jun 2012 04:05:22 +0000 Subject: All languages now support Null except for python and php, python is proving slightly trickier. --- src/unit/basic.unit | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/unit') diff --git a/src/unit/basic.unit b/src/unit/basic.unit index 3ab8dc2..2c2c31a 100644 --- a/src/unit/basic.unit +++ b/src/unit/basic.unit @@ -12,6 +12,8 @@ #include "gats/list.h" #include "gats/boolean.h" #include "gats/string.h" +#include "gats/null.h" +#include "gats/gatsstream.h" #include "bu/membuf.h" #include "bu/list.h" @@ -167,4 +169,23 @@ suite Basic delete pDict; } } + + test null + { + MemBuf mb; + { + Gats::Null n; + Gats::GatsStream gs( mb ); + gs.writeObject( &n ); + } + + mb.setPos( 0 ); + + { + Gats::GatsStream gs( mb ); + Gats::Object *pObj = gs.readObject(); + unitTest( pObj->getType() == Gats::typeNull ); + delete pObj; + } + } } -- cgit v1.2.3