aboutsummaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/unit/basic.unit21
1 files changed, 21 insertions, 0 deletions
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 @@
12#include "gats/list.h" 12#include "gats/list.h"
13#include "gats/boolean.h" 13#include "gats/boolean.h"
14#include "gats/string.h" 14#include "gats/string.h"
15#include "gats/null.h"
16#include "gats/gatsstream.h"
15 17
16#include "bu/membuf.h" 18#include "bu/membuf.h"
17#include "bu/list.h" 19#include "bu/list.h"
@@ -167,4 +169,23 @@ suite Basic
167 delete pDict; 169 delete pDict;
168 } 170 }
169 } 171 }
172
173 test null
174 {
175 MemBuf mb;
176 {
177 Gats::Null n;
178 Gats::GatsStream gs( mb );
179 gs.writeObject( &n );
180 }
181
182 mb.setPos( 0 );
183
184 {
185 Gats::GatsStream gs( mb );
186 Gats::Object *pObj = gs.readObject();
187 unitTest( pObj->getType() == Gats::typeNull );
188 delete pObj;
189 }
190 }
170} 191}