Split headers to improve compilation time #670
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
#include <glm/gtc/constants.hpp>
|
||||
#include <glm/gtc/vec1.hpp>
|
||||
#include <glm/gtc/random.hpp>
|
||||
#include <glm/ivec4.hpp>
|
||||
#include <glm/dvec4.hpp>
|
||||
#include <glm/vec4.hpp>
|
||||
#include <glm/vec3.hpp>
|
||||
#include <glm/vec2.hpp>
|
||||
#include <vector>
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
@@ -18,7 +23,7 @@ namespace floor_
|
||||
{
|
||||
static int test()
|
||||
{
|
||||
int Error(0);
|
||||
int Error = 0;
|
||||
|
||||
{
|
||||
float A = 1.1f;
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
#include <glm/trigonometric.hpp>
|
||||
#include <glm/vector_relational.hpp>
|
||||
#include <glm/ext/vector_relational.hpp>
|
||||
#include <glm/gtc/vec1.hpp>
|
||||
#include <glm/ext/fvec1.hpp>
|
||||
#include <glm/fvec2.hpp>
|
||||
#include <glm/fvec3.hpp>
|
||||
#include <glm/fvec4.hpp>
|
||||
#include <glm/dvec2.hpp>
|
||||
#include <glm/dvec3.hpp>
|
||||
#include <glm/dvec4.hpp>
|
||||
#include <limits>
|
||||
|
||||
namespace length
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#include <glm/integer.hpp>
|
||||
#include <glm/vector_relational.hpp>
|
||||
#include <glm/gtc/vec1.hpp>
|
||||
#include <glm/ivec2.hpp>
|
||||
#include <glm/ivec3.hpp>
|
||||
#include <glm/ivec4.hpp>
|
||||
#include <glm/uvec2.hpp>
|
||||
#include <glm/uvec3.hpp>
|
||||
#include <glm/uvec4.hpp>
|
||||
#include <vector>
|
||||
#include <ctime>
|
||||
#include <cstdio>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
glmCreateTestGTC(ext_bvec1)
|
||||
glmCreateTestGTC(ext_matrix_relational)
|
||||
glmCreateTestGTC(ext_scalar_relational)
|
||||
glmCreateTestGTC(ext_vec1)
|
||||
|
||||
105
test/ext/ext_bvec1.cpp
Normal file
105
test/ext/ext_bvec1.cpp
Normal file
@@ -0,0 +1,105 @@
|
||||
#include <glm/ext/bvec1.hpp>
|
||||
#include <glm/ext/bvec1_precision.hpp>
|
||||
#include <vector>
|
||||
|
||||
template <typename genType>
|
||||
static int test_operators()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
genType const A(true);
|
||||
genType const B(true);
|
||||
{
|
||||
bool const R = A != B;
|
||||
bool const S = A == B;
|
||||
Error += (S && !R) ? 0 : 1;
|
||||
}
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
static int test_ctor()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
glm::bvec1 const A = genType(true);
|
||||
|
||||
glm::bvec1 const E(genType(true));
|
||||
Error += A == E ? 0 : 1;
|
||||
|
||||
glm::bvec1 const F(E);
|
||||
Error += A == F ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
static int test_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::bvec1) == sizeof(genType) ? 0 : 1;
|
||||
Error += genType().length() == 1 ? 0 : 1;
|
||||
Error += genType::length() == 1 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
static int test_relational()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
genType const A(true);
|
||||
genType const B(true);
|
||||
genType const C(false);
|
||||
|
||||
Error += A == B ? 0 : 1;
|
||||
Error += (A && B) == A ? 0 : 1;
|
||||
Error += (A || C) == A ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
static int test_constexpr()
|
||||
{
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static_assert(genType::length() == 1, "GLM: Failed constexpr");
|
||||
# endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_operators<glm::bvec1>();
|
||||
Error += test_operators<glm::lowp_bvec1>();
|
||||
Error += test_operators<glm::mediump_bvec1>();
|
||||
Error += test_operators<glm::highp_bvec1>();
|
||||
|
||||
Error += test_ctor<glm::bvec1>();
|
||||
Error += test_ctor<glm::lowp_bvec1>();
|
||||
Error += test_ctor<glm::mediump_bvec1>();
|
||||
Error += test_ctor<glm::highp_bvec1>();
|
||||
|
||||
Error += test_size<glm::bvec1>();
|
||||
Error += test_size<glm::lowp_bvec1>();
|
||||
Error += test_size<glm::mediump_bvec1>();
|
||||
Error += test_size<glm::highp_bvec1>();
|
||||
|
||||
Error += test_relational<glm::bvec1>();
|
||||
Error += test_relational<glm::lowp_bvec1>();
|
||||
Error += test_relational<glm::mediump_bvec1>();
|
||||
Error += test_relational<glm::highp_bvec1>();
|
||||
|
||||
Error += test_constexpr<glm::bvec1>();
|
||||
Error += test_constexpr<glm::lowp_bvec1>();
|
||||
Error += test_constexpr<glm::mediump_bvec1>();
|
||||
Error += test_constexpr<glm::highp_bvec1>();
|
||||
|
||||
return Error;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <glm/ext/matrix_relational.hpp>
|
||||
#include <glm/mat4x3.hpp>
|
||||
#include <glm/fvec4.hpp>
|
||||
|
||||
int test_equal()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <glm/gtx/functions.hpp>
|
||||
#include <glm/fvec2.hpp>
|
||||
#include <vector>
|
||||
|
||||
int test_gauss_1d()
|
||||
|
||||
Reference in New Issue
Block a user