Skip to content

Commit

Permalink
gna
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Jan 17, 2024
1 parent 2e6f648 commit 17df768
Showing 1 changed file with 35 additions and 29 deletions.
64 changes: 35 additions & 29 deletions test/core/core_type_vec4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,68 +222,74 @@ static int test_vec4_ctor()
}

{
glm::vec1 const v1_0(1.0f);
glm::vec1 const v1_1(2.0f);
glm::vec1 const v1_2(3.0f);
glm::vec1 const v1_3(4.0f);
glm::vec1 v1_0(1.0f);
glm::vec1 v1_1(2.0f);
glm::vec1 v1_2(3.0f);
glm::vec1 v1_3(4.0f);

glm::vec2 const v2_0(1.0f, 2.0f);
glm::vec2 const v2_1(2.0f, 3.0f);
glm::vec2 const v2_2(3.0f, 4.0f);
glm::vec2 v2_0(1.0f, 2.0f);
glm::vec2 v2_1(2.0f, 3.0f);
glm::vec2 v2_2(3.0f, 4.0f);

glm::vec3 const v3_0(1.0f, 2.0f, 3.0f);
glm::vec3 const v3_1(2.0f, 3.0f, 4.0f);
glm::vec3 v3_0(1.0f, 2.0f, 3.0f);
glm::vec3 v3_1(2.0f, 3.0f, 4.0f);

glm::vec4 const O(1.0f, 2.0, 3.0f, 4.0);
glm::vec4 O(1.0f, 2.0, 3.0f, 4.0);

glm::vec4 const A(v1_0, v1_1, v2_2);
glm::vec4 A(v1_0, v1_1, v2_2);
Error += glm::all(glm::equal(A, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const B(1.0f, 2.0f, v2_2);
glm::vec4 B(1.0f, 2.0f, v2_2);
Error += glm::all(glm::equal(B, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const C(v1_0, 2.0f, v2_2);
glm::vec4 C(v1_0, 2.0f, v2_2);
Error += glm::all(glm::equal(C, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const D(1.0f, v1_1, v2_2);
glm::vec4 D(1.0f, v1_1, v2_2);
Error += glm::all(glm::equal(D, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const E(v2_0, v1_2, v1_3);
glm::vec4 E(v2_0, v1_2, v1_3);
Error += glm::all(glm::equal(E, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const F(v2_0, 3.0, v1_3);
glm::vec4 F(v2_0, 3.0, v1_3);
Error += glm::all(glm::equal(F, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const G(v2_0, v1_2, 4.0);
glm::vec4 G(v2_0, v1_2, 4.0);
Error += glm::all(glm::equal(G, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const H(v2_0, 3.0f, 4.0);
glm::vec4 H(v2_0, 3.0f, 4.0);
Error += glm::all(glm::equal(H, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 I(v3_0, 4.0);
Error += glm::all(glm::equal(I, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 J(1.0f, v3_1);
Error += glm::all(glm::equal(J, O, glm::epsilon<float>())) ? 0 : 1;
}

{
glm::vec1 const v1_0(1.0f);
glm::vec1 const v1_1(2.0f);
glm::vec1 const v1_2(3.0f);
glm::vec1 const v1_3(4.0f);
glm::vec1 v1_0(1.0f);
glm::vec1 v1_1(2.0f);
glm::vec1 v1_2(3.0f);
glm::vec1 v1_3(4.0f);

glm::vec2 const v2(2.0f, 3.0f);
glm::vec2 v2(2.0f, 3.0f);

glm::vec4 const O(1.0f, 2.0, 3.0f, 4.0);
glm::vec4 O(1.0f, 2.0, 3.0f, 4.0);

glm::vec4 const A(v1_0, v2, v1_3);
glm::vec4 A(v1_0, v2, v1_3);
Error += glm::all(glm::equal(A, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const B(v1_0, v2, 4.0);
glm::vec4 B(v1_0, v2, 4.0);
Error += glm::all(glm::equal(B, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const C(1.0, v2, v1_3);
glm::vec4 C(1.0, v2, v1_3);
Error += glm::all(glm::equal(C, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const D(1.0f, v2, 4.0);
glm::vec4 D(1.0f, v2, 4.0);
Error += glm::all(glm::equal(D, O, glm::epsilon<float>())) ? 0 : 1;

glm::vec4 const E(1.0, v2, 4.0f);
glm::vec4 E(1.0, v2, 4.0f);
Error += glm::all(glm::equal(E, O, glm::epsilon<float>())) ? 0 : 1;
}

Expand Down

0 comments on commit 17df768

Please sign in to comment.