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**)
|
|
|
|
{
|
2015-04-13 16:45:56 +10:00
|
|
|
util::TAP::logger tap;
|
|
|
|
|
2015-04-09 20:45:55 +10:00
|
|
|
// Check casting works between intergral and floating formats
|
|
|
|
{
|
2017-11-22 17:03:00 +11:00
|
|
|
util::srgba<4,float> f {1.f};
|
|
|
|
util::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
|
|
|
}
|