From 47fefee88e83425b9098293fa07877f7d41c18d6 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Sun, 21 Jun 2015 12:16:40 +0200 Subject: Add tests for get_type --- test/nbttest.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'test/nbttest.cpp') diff --git a/test/nbttest.cpp b/test/nbttest.cpp index eead43efd0..23e6a1a80b 100644 --- a/test/nbttest.cpp +++ b/test/nbttest.cpp @@ -1,9 +1,20 @@ #include "microtest.h" -#include "tag.h" -#include +#include "libnbt.h" #include +using namespace nbt; + +void test_get_type() +{ + ASSERT(tag_byte().get_type() == tag_type::Byte); + ASSERT(tag_short().get_type() == tag_type::Short); + ASSERT(tag_int().get_type() == tag_type::Int); + ASSERT(tag_long().get_type() == tag_type::Long); + ASSERT(tag_float().get_type() == tag_type::Float); + ASSERT(tag_double().get_type() == tag_type::Double); +} + int main() { - return EXIT_SUCCESS; + test_get_type(); } -- cgit 0.0.5-2-1-g0f52