2015-01-15 14:03:44 +11:00
|
|
|
#include "colour.hpp"
|
2015-04-13 18:06:08 +10:00
|
|
|
|
2015-04-13 16:45:56 +10:00
|
|
|
#include "tap.hpp"
|
2015-01-15 14:03:44 +11:00
|
|
|
|
2016-07-28 13:31:52 +10:00
|
|
|
|
2015-01-15 14:03:44 +11:00
|
|
|
int
|
|
|
|
main (int, char**)
|
|
|
|
{
|
2018-08-05 14:42:02 +10:00
|
|
|
cruft::TAP::logger tap;
|
2015-04-13 16:45:56 +10:00
|
|
|
|
2015-04-09 20:45:55 +10:00
|
|
|
// Check casting works between intergral and floating formats
|
|
|
|
{
|
2018-08-05 14:42:02 +10:00
|
|
|
cruft::srgba<4,float> f {1.f};
|
|
|
|
cruft::srgba<4,uint8_t> u {255};
|
2015-04-13 16:45:56 +10:00
|
|
|
tap.expect_eq (f.cast<uint8_t> (), u, "cast float to u8");
|
|
|
|
tap.expect_eq (u.cast<float> (), f, "cast u8 to float");
|
2015-04-09 20:45:55 +10:00
|
|
|
}
|
2015-04-09 20:46:55 +10:00
|
|
|
|
2017-05-22 13:55:21 +10:00
|
|
|
return tap.status ();
|
2015-01-15 14:03:44 +11:00
|
|
|
}
|