Added ceilMultiple test with integers

This commit is contained in:
Christophe Riccio 2016-03-02 21:32:44 +01:00
parent cb71d2376d
commit c6aa981e2a

View File

@ -364,10 +364,31 @@ namespace ceilMultiple
return Error;
}
int test_int()
{
type<int> const Data[] =
{
{3, 4, 4},
{7, 8, 4},
{5, 8, 4},
};
int Error(0);
for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<int>); i < n; ++i)
{
int Result = glm::ceilMultiple(Data[i].Source, Data[i].Multiple);
Error += Data[i].Return == Result ? 0 : 1;
}
return Error;
}
int test()
{
int Error(0);
Error += test_int();
Error += test_float();
return Error;