mirror of
https://github.com/recp/cglm.git
synced 2025-10-04 01:00:46 +00:00
Add ivec3 and ivec4 files
This commit is contained in:
20
test/src/test_ivec3.h
Normal file
20
test/src/test_ivec3.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* 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, ivec3) {
|
||||
ivec4 v4 = {2, 3, 5, 7};
|
||||
ivec3 v3;
|
||||
|
||||
GLM(ivec3)(v4, v3);
|
||||
ASSERT(test_eq(v3[0], v4[0]))
|
||||
ASSERT(test_eq(v3[1], v4[1]))
|
||||
ASSERT(test_eq(v3[2], v4[2]))
|
||||
|
||||
TEST_SUCCESS
|
||||
}
|
21
test/src/test_ivec4.h
Normal file
21
test/src/test_ivec4.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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, ivec4) {
|
||||
ivec3 v3 = {2, 3, 5};
|
||||
ivec4 v4;
|
||||
|
||||
GLM(ivec4)(v3, 7, v4);
|
||||
ASSERT(test_eq(v4[0], v3[0]))
|
||||
ASSERT(test_eq(v4[1], v3[1]))
|
||||
ASSERT(test_eq(v4[2], v3[2]))
|
||||
ASSERT(test_eq(v4[3], 7))
|
||||
|
||||
TEST_SUCCESS
|
||||
}
|
@@ -16,6 +16,8 @@
|
||||
#include "test_vec3.h"
|
||||
#include "test_vec4.h"
|
||||
#include "test_ivec2.h"
|
||||
#include "test_ivec3.h"
|
||||
#include "test_ivec4.h"
|
||||
#include "test_mat2.h"
|
||||
#include "test_mat3.h"
|
||||
#include "test_mat4.h"
|
||||
@@ -41,6 +43,8 @@
|
||||
#include "test_vec3.h"
|
||||
#include "test_vec4.h"
|
||||
#include "test_ivec2.h"
|
||||
#include "test_ivec3.h"
|
||||
#include "test_ivec4.h"
|
||||
#include "test_mat2.h"
|
||||
#include "test_mat3.h"
|
||||
#include "test_mat4.h"
|
||||
|
20
test/tests.h
20
test/tests.h
@@ -735,6 +735,16 @@ TEST_DECLARE(glm_ivec2)
|
||||
|
||||
TEST_DECLARE(glmc_ivec2)
|
||||
|
||||
/* ivec3 */
|
||||
TEST_DECLARE(glm_ivec3)
|
||||
|
||||
TEST_DECLARE(glmc_ivec3)
|
||||
|
||||
/* ivec4 */
|
||||
TEST_DECLARE(glm_ivec4)
|
||||
|
||||
TEST_DECLARE(glmc_ivec4)
|
||||
|
||||
/* structs */
|
||||
TEST_DECLARE(mat3s_identity_init)
|
||||
TEST_DECLARE(mat3s_zero_init)
|
||||
@@ -1468,6 +1478,16 @@ TEST_LIST {
|
||||
|
||||
TEST_ENTRY(glmc_ivec2)
|
||||
|
||||
/* ivec3 */
|
||||
TEST_ENTRY(glm_ivec3)
|
||||
|
||||
TEST_ENTRY(glmc_ivec3)
|
||||
|
||||
/* ivec4 */
|
||||
TEST_ENTRY(glm_ivec4)
|
||||
|
||||
TEST_ENTRY(glmc_ivec4)
|
||||
|
||||
/* structs */
|
||||
TEST_ENTRY(mat3s_identity_init)
|
||||
TEST_ENTRY(mat3s_zero_init)
|
||||
|
Reference in New Issue
Block a user