mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Added ceilMultiple test with integers
This commit is contained in:
parent
cb71d2376d
commit
c6aa981e2a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user