test/nbt_tags: I have no clue what’s going on here.
Committing so I can debug at my PC.Soda
parent
8da758becd
commit
ecf3b14b5a
|
@ -29,16 +29,22 @@ int main(){
|
||||||
std::cout << "NBT object tests" << std::endl;
|
std::cout << "NBT object tests" << std::endl;
|
||||||
std::cout << "################################################################################" << std::endl;
|
std::cout << "################################################################################" << std::endl;
|
||||||
|
|
||||||
//Byte tag constructor test
|
std::vector<uint8_t> vector;
|
||||||
//uint8_t bytetest[] = {0x01, 0x00, 0x02, 0x68, 0x69, 0x32};
|
|
||||||
//NBT::Byte byte = NBT::Byte(bytetest);
|
|
||||||
|
|
||||||
//ASSERT(byte.tagType == 1);
|
NBT::Tag::Generic generic = NBT::Tag::Generic();
|
||||||
//ASSERT(byte.nameSize == 2);
|
ASSERT(generic.getTagType() == NBT::TagType::INVALID);
|
||||||
//ASSERT(byte.content = 0x32);
|
ASSERT(generic.serialize(&vector).isError);
|
||||||
//ASSERT(byte.name == tiny_utf8::string("hi"));
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue