libcruft-util/test/singleton.cpp

14 lines
255 B
C++
Raw Normal View History

2018-03-22 15:06:48 +11:00
#include "singleton.hpp"
#include "tap.hpp"
int main ()
{
cruft::TAP::logger tap;
2018-03-22 15:06:48 +11:00
auto obj = cruft::singleton<int>::instantiate (42);
tap.expect_eq (cruft::singleton<int>::get (), 42, "singleton stores value");
2018-03-22 15:06:48 +11:00
return tap.status ();
}