You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
536 B
39 lines
536 B
#include <cxxtest/TestSuite.h>
|
|
|
|
#include "Common.hpp"
|
|
#include "Fixture.hpp"
|
|
#include "Multiton.hpp"
|
|
|
|
|
|
class TestMultitonSuite : public CxxTest::TestSuite
|
|
{
|
|
|
|
private:
|
|
|
|
class Dummy
|
|
{
|
|
public:
|
|
void sayHi() { LOG( Logger::FINEST, "Hi there!"); }
|
|
|
|
};
|
|
|
|
class DummyMultiton : public Multiton<std::string, Dummy>
|
|
{
|
|
|
|
};
|
|
|
|
public:
|
|
|
|
void testBasic( void )
|
|
{
|
|
TEST_HEADER;
|
|
|
|
DummyMultiton::getRef("foobar").sayHi();
|
|
DummyMultiton::getPtr("foobar")->sayHi();
|
|
|
|
DummyMultiton::destroy();
|
|
}
|
|
|
|
|
|
};
|