diff --git a/src/test/nbt_tags.cpp b/src/test/nbt_tags.cpp index ec839fa..5f34bf7 100644 --- a/src/test/nbt_tags.cpp +++ b/src/test/nbt_tags.cpp @@ -29,16 +29,22 @@ int main(){ std::cout << "NBT object tests" << std::endl; std::cout << "################################################################################" << std::endl; - //Byte tag constructor test - //uint8_t bytetest[] = {0x01, 0x00, 0x02, 0x68, 0x69, 0x32}; - //NBT::Byte byte = NBT::Byte(bytetest); + std::vector vector; - //ASSERT(byte.tagType == 1); - //ASSERT(byte.nameSize == 2); - //ASSERT(byte.content = 0x32); - //ASSERT(byte.name == tiny_utf8::string("hi")); + NBT::Tag::Generic generic = NBT::Tag::Generic(); + ASSERT(generic.getTagType() == NBT::TagType::INVALID); + ASSERT(generic.serialize(&vector).isError); + std::cout << vector.size() << std::endl; + ASSERT(generic.serialize(&vector).errorCode == ErrorCodes::INVALID_TYPE); + std::cout << vector.size() << std::endl; + ASSERT(generic.serializeWithoutHeader(&vector).isError); + std::cout << vector.size() << std::endl; + ASSERT(generic.serializeWithoutHeader(&vector).errorCode == ErrorCodes::INVALID_TYPE); + std::cout << vector.size() << std::endl; + ASSERT(vector.size() == 10); + std::cout << "Passed Generic (super type) test" << std::endl; - //std::cout << "Passed Byte Tag constructor test." << std::endl; + //????????? return 0; }