summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-07-22 20:57:58 +0200
committerljfa-ag <ljfa-ag@web.de>2015-07-22 20:57:58 +0200
commit2054a73eeff2a5a931d466b6722215dcf9666b2a (patch)
tree186fb259dd76691fd2b0bca841dc9e1a78b6e7b7
parentdb169073f195efcb9b35df5c314c65ba39705cef (diff)
downloadProject-Tick-2054a73eeff2a5a931d466b6722215dcf9666b2a.tar.gz
Project-Tick-2054a73eeff2a5a931d466b6722215dcf9666b2a.zip
Add some missing tests for value
-rw-r--r--test/nbttest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/nbttest.cpp b/test/nbttest.cpp
index 7e3a78b341..ee4b77e321 100644
--- a/test/nbttest.cpp
+++ b/test/nbttest.cpp
@@ -248,6 +248,10 @@ void test_value()
ASSERT(!val1);
ASSERT(val2 == tag_int(21));
+ val3 = tag_short(2);
+ EXPECT_EXCEPTION(val3 = tag_string("foo"), std::bad_cast);
+ ASSERT(val3.get() == tag_short(2));
+
val2.set_ptr(make_unique<tag_string>("foo"));
ASSERT(val2 == tag_string("foo"));
std::clog << "test_value passed" << std::endl;