diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-06-11 04:05:22 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-06-11 04:05:22 +0000 |
commit | 380b36be3352cd9a5c93dbd67db25346166a8547 (patch) | |
tree | f69613e7b6238744c34af6dc14d6feb68a4f6706 /src/unit | |
parent | 3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc (diff) | |
download | libgats-380b36be3352cd9a5c93dbd67db25346166a8547.tar.gz libgats-380b36be3352cd9a5c93dbd67db25346166a8547.tar.bz2 libgats-380b36be3352cd9a5c93dbd67db25346166a8547.tar.xz libgats-380b36be3352cd9a5c93dbd67db25346166a8547.zip |
All languages now support Null except for python and php, python is proving
slightly trickier.
Diffstat (limited to '')
-rw-r--r-- | src/unit/basic.unit | 21 |
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 | } |