Files
unison/samples/main-test.cc

44 lines
685 B
C++
Raw Normal View History

/* -*- Mode:C++; c-basic-offset:4; tab-width:4; indent-tabs-mode:f -*- */
#include "ns3/test.h"
using namespace ns3;
2006-09-06 14:06:04 +02:00
#ifdef RUN_SELF_TESTS
2006-09-06 14:03:39 +02:00
// declare subclass of base class Test
class MyTest : public Test {
public:
MyTest (bool ok);
virtual ~MyTest ();
virtual bool runTests (void);
private:
bool m_ok;
};
2006-09-06 14:03:39 +02:00
// implement MyTest
MyTest::MyTest (bool ok)
: Test ("My"),
m_ok (ok)
{}
MyTest::~MyTest ()
{}
bool
MyTest::runTests (void)
{
return m_ok;
}
2006-09-06 14:03:39 +02:00
// instantiate MyTest once
2006-09-06 14:06:04 +02:00
static MyTest g_my_test = MyTest (true);
#endif /* RUN_SELF_TESTS */
int main (int argc, char *argv[])
{
2006-09-06 14:03:39 +02:00
// run tests
TestManager::enableVerbose ();
TestManager::runTests ();
return 0;
}