tut logo

restartable/test_segfaults2.cpp


restartable/test_segfaults2.cpp

tut test will genarate also sigsegv.

#include <tut/tut.hpp>
namespace tut
{
struct segfault_data_2
{
virtual ~segfault_data_2() { }
};
typedef test_group<segfault_data_2> tg;
typedef tg::object object;
tg segfault_group2("seg fault 2");
template<>
template<>
void object::test<1>()
{
}
template<>
template<>
void object::test<2>()
{
*((char*)0) = 'x';
}
template<>
template<>
void object::test<3>()
{
}
template<>
template<>
void object::test<4>()
{
// OK
}
template<>
template<>
void object::test<5>()
{
*((char*)0) = 'x';
}
template<>
template<>
void object::test<6>()
{
// OK
}
}

All Rights Reserved. Generated on Wed Dec 18 2013 11:19:52 for TUT by doxygen 1.8.5