libcruft-util/test/singleton.cpp

14 lines
277 B
C++
Raw Normal View History

#include <cruft/util/singleton.hpp>
2018-03-22 15:06:48 +11:00
#include <cruft/util/tap.hpp>
2018-03-22 15:06:48 +11:00
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 ();
}