From: Perttu Ahola Date: Mon, 26 Nov 2012 19:40:39 +0000 (+0200) Subject: unit test: TestNodedefSerialization X-Git-Tag: 0.4.4~43 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9714612999dc88e67566be91ec41659c5254321f;p=oweals%2Fminetest.git unit test: TestNodedefSerialization --- diff --git a/src/test.cpp b/src/test.cpp index f81f2910c..52782fa36 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -314,6 +314,26 @@ struct TestSerialization: public TestBase } }; +struct TestNodedefSerialization: public TestBase +{ + void Run() + { + ContentFeatures f; + f.name = "default:stone"; + for(int i = 0; i < 6; i++) + f.tiledef[i].name = "default_stone.png"; + f.is_ground_content = true; + std::ostringstream os(std::ios::binary); + f.serialize(os); + verbosestream<<"Test ContentFeatures size: "<