Files
unison/samples/main-test.cc

44 lines
685 B
C++
Raw Normal View History

2006-11-01 13:11:30 +01:00
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
#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:
2006-11-01 13:11:30 +01:00
MyTest (bool ok);
virtual ~MyTest ();
virtual bool RunTests (void);
private:
2006-11-01 13:11:30 +01:00
bool m_ok;
};
2006-09-06 14:03:39 +02:00
// implement MyTest
MyTest::MyTest (bool ok)
2006-11-01 13:11:30 +01:00
: Test ("My"),
m_ok (ok)
{}
MyTest::~MyTest ()
{}
bool
2006-10-06 13:37:25 +02:00
MyTest::RunTests (void)
{
2006-11-01 13:11:30 +01:00
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-11-01 13:11:30 +01:00
// run tests
TestManager::EnableVerbose ();
TestManager::RunTests ();
return 0;
}