2024-05-29 16:29:08 +10:00
|
|
|
#include <cruft/util/singleton.hpp>
|
2018-03-22 15:06:48 +11:00
|
|
|
|
2024-05-29 16:29:08 +10:00
|
|
|
#include <cruft/util/tap.hpp>
|
2018-03-22 15:06:48 +11:00
|
|
|
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
2018-08-05 14:42:02 +10:00
|
|
|
cruft::TAP::logger tap;
|
2018-03-22 15:06:48 +11:00
|
|
|
|
2018-08-05 14:42:02 +10: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 ();
|
|
|
|
}
|