#include "addstorage.h" #include class TAddStorageTest: public TTestBase { UNIT_TEST_SUITE(TAddStorageTest); UNIT_TEST(TestIt) UNIT_TEST_SUITE_END(); class TClass: public TAdditionalStorage { }; private: inline void TestIt() { THolder c(new (100) TClass); UNIT_ASSERT_EQUAL(c->AdditionalDataLength(), 100); //test segfault memset(c->AdditionalData(), 0, c->AdditionalDataLength()); } }; UNIT_TEST_SUITE_REGISTRATION(TAddStorageTest);