2015-11-18 14:43:51 +11:00
|
|
|
#include "tap.hpp"
|
|
|
|
#include "strongdef.hpp"
|
|
|
|
|
|
|
|
|
2018-06-27 17:58:45 +10:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2015-11-18 14:43:51 +11:00
|
|
|
int
|
|
|
|
main (void)
|
|
|
|
{
|
|
|
|
util::TAP::logger tap;
|
2015-11-18 14:43:13 +11:00
|
|
|
|
2015-11-18 14:43:51 +11:00
|
|
|
// These tests are less about functional testing, and more about link testing.
|
2018-06-27 17:58:45 +10:00
|
|
|
util::strongdef::index<void,unsigned> fortytwo (42u);
|
2015-11-18 14:43:51 +11:00
|
|
|
tap.expect_eq (fortytwo.data, 42u, "raw data equality");
|
2018-06-22 17:41:56 +10:00
|
|
|
tap.expect_eq (fortytwo, decltype(fortytwo) (42u), "passthrough equality");
|
2015-11-18 14:43:51 +11:00
|
|
|
|
2018-06-27 17:58:45 +10:00
|
|
|
#if 0
|
2015-11-18 14:43:13 +11:00
|
|
|
// Ensure numeric_limits has been specialised. Unknown types are default initialised, so check if we get non-zero for maximum.
|
|
|
|
tap.expect_eq (std::numeric_limits<decltype(fortytwo)>::max (),
|
|
|
|
std::numeric_limits<decltype(fortytwo)::value_type>::max (),
|
|
|
|
"numeric_limits has been specialised");
|
2018-06-27 17:58:45 +10:00
|
|
|
#endif
|
2015-11-18 14:43:13 +11:00
|
|
|
|
2015-11-18 14:43:51 +11:00
|
|
|
return tap.status ();
|
|
|
|
}
|