mirror of
https://github.com/g-truc/glm.git
synced 2025-04-10 07:18:54 +00:00
Added int and uint tests
This commit is contained in:
parent
ee56c3a449
commit
faff516c22
2 changed files with 40 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
|||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2008-08-31
|
||||
// Updated : 2008-08-31
|
||||
// Updated : 2011-05-06
|
||||
// Licence : This source is under MIT License
|
||||
// File : test/core/type_float.cpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -2,14 +2,51 @@
|
|||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2008-08-31
|
||||
// Updated : 2008-08-31
|
||||
// Updated : 2011-05-06
|
||||
// Licence : This source is under MIT License
|
||||
// File : test/core/type_int.cpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
int test_int_size()
|
||||
{
|
||||
return
|
||||
sizeof(glm::int_t) != sizeof(glm::lowp_int) &&
|
||||
sizeof(glm::int_t) != sizeof(glm::mediump_int) &&
|
||||
sizeof(glm::int_t) != sizeof(glm::highp_int);
|
||||
}
|
||||
|
||||
int test_uint_size()
|
||||
{
|
||||
return
|
||||
sizeof(glm::uint_t) != sizeof(glm::lowp_uint) &&
|
||||
sizeof(glm::uint_t) != sizeof(glm::mediump_uint) &&
|
||||
sizeof(glm::uint_t) != sizeof(glm::highp_uint);
|
||||
}
|
||||
|
||||
int test_int_precision()
|
||||
{
|
||||
return (
|
||||
sizeof(glm::lowp_int) <= sizeof(glm::mediump_int) &&
|
||||
sizeof(glm::mediump_int) <= sizeof(glm::highp_int)) ? 0 : 1;
|
||||
}
|
||||
|
||||
int test_uint_precision()
|
||||
{
|
||||
return (
|
||||
sizeof(glm::lowp_uint) <= sizeof(glm::mediump_uint) &&
|
||||
sizeof(glm::mediump_uint) <= sizeof(glm::highp_uint)) ? 0 : 1;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
return -1;
|
||||
int Error = 0;
|
||||
|
||||
Error += test_int_size();
|
||||
Error += test_int_precision();
|
||||
Error += test_uint_size();
|
||||
Error += test_uint_precision();
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue