mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
Add ivec2 files
This commit is contained in:
24
test/src/test_ivec2.h
Normal file
24
test/src/test_ivec2.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#include "test_common.h"
|
||||
|
||||
TEST_IMPL(GLM_PREFIX, ivec2) {
|
||||
ivec4 v4 = {2, 3, 5, 7};
|
||||
ivec4 v3 = {11, 13, 17};
|
||||
ivec4 v2;
|
||||
|
||||
GLM(ivec2)(v4, v2);
|
||||
ASSERT(test_eq(v2[0], v4[0]))
|
||||
ASSERT(test_eq(v2[1], v4[1]))
|
||||
|
||||
GLM(ivec2)(v3, v2);
|
||||
ASSERT(test_eq(v2[0], v3[0]))
|
||||
ASSERT(test_eq(v2[1], v3[1]))
|
||||
|
||||
TEST_SUCCESS
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "test_vec2.h"
|
||||
#include "test_vec3.h"
|
||||
#include "test_vec4.h"
|
||||
#include "test_ivec2.h"
|
||||
#include "test_mat2.h"
|
||||
#include "test_mat3.h"
|
||||
#include "test_mat4.h"
|
||||
@@ -39,6 +40,7 @@
|
||||
#include "test_vec2.h"
|
||||
#include "test_vec3.h"
|
||||
#include "test_vec4.h"
|
||||
#include "test_ivec2.h"
|
||||
#include "test_mat2.h"
|
||||
#include "test_mat3.h"
|
||||
#include "test_mat4.h"
|
||||
|
||||
10
test/tests.h
10
test/tests.h
@@ -730,6 +730,11 @@ TEST_DECLARE(glmc_vec4_fract)
|
||||
TEST_DECLARE(glmc_vec4_hadd)
|
||||
TEST_DECLARE(glmc_vec4_sqrt)
|
||||
|
||||
/* ivec2 */
|
||||
TEST_DECLARE(glm_ivec2)
|
||||
|
||||
TEST_DECLARE(glmc_ivec2)
|
||||
|
||||
/* structs */
|
||||
TEST_DECLARE(mat3s_identity_init)
|
||||
TEST_DECLARE(mat3s_zero_init)
|
||||
@@ -1458,6 +1463,11 @@ TEST_LIST {
|
||||
TEST_ENTRY(glmc_vec4_hadd)
|
||||
TEST_ENTRY(glmc_vec4_sqrt)
|
||||
|
||||
/* ivec2 */
|
||||
TEST_ENTRY(glm_ivec2)
|
||||
|
||||
TEST_ENTRY(glmc_ivec2)
|
||||
|
||||
/* structs */
|
||||
TEST_ENTRY(mat3s_identity_init)
|
||||
TEST_ENTRY(mat3s_zero_init)
|
||||
|
||||
Reference in New Issue
Block a user