From 2054a73eeff2a5a931d466b6722215dcf9666b2a Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Wed, 22 Jul 2015 20:57:58 +0200 Subject: Add some missing tests for value --- test/nbttest.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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("foo")); ASSERT(val2 == tag_string("foo")); std::clog << "test_value passed" << std::endl; -- cgit 0.0.5-2-1-g0f52