mirror of
https://github.com/recp/cglm.git
synced 2026-01-06 15:10:04 +00:00
rename struct/aabb2d.h functions to match aabb2d.h, add tests
This commit is contained in:
28
test/src/test_aabb2d.h
Normal file
28
test/src/test_aabb2d.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* 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"
|
||||
|
||||
#ifndef CGLM_TEST_AABB2D_ONCE
|
||||
#define CGLM_TEST_AABB2D_ONCE
|
||||
|
||||
/* Macros */
|
||||
/* Deprecated */
|
||||
|
||||
#endif /* CGLM_TEST_VEC4_ONCE */
|
||||
|
||||
/* --- */
|
||||
TEST_IMPL(GLM_PREFIX, aabb2d_sizev) {
|
||||
vec2 a[2] = {{10.0f, 10.0f}, {20.0f, 20.0f}};
|
||||
vec2 size = {0};
|
||||
|
||||
GLM(aabb2d_sizev)(a, size);
|
||||
|
||||
ASSERTIFY(test_assert_vec2_eq(size, (vec2){10.0f, 10.0f}))
|
||||
|
||||
TEST_SUCCESS
|
||||
}
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "test_affine.h"
|
||||
#include "test_affine2d.h"
|
||||
#include "test_affine_mat.h"
|
||||
#include "test_aabb2d.h"
|
||||
#include "test_ray.h"
|
||||
#include "test_cam.h"
|
||||
#include "test_cam_lh_no.h"
|
||||
@@ -72,6 +73,7 @@
|
||||
#include "test_affine.h"
|
||||
#include "test_affine2d.h"
|
||||
#include "test_affine_mat.h"
|
||||
#include "test_aabb2d.h"
|
||||
#include "test_ray.h"
|
||||
#include "test_cam.h"
|
||||
#include "test_cam_lh_no.h"
|
||||
|
||||
@@ -97,6 +97,9 @@ TEST_DECLARE(glmc_rotate2d_make)
|
||||
TEST_DECLARE(glmc_rotate2d)
|
||||
TEST_DECLARE(glmc_rotate2d_to)
|
||||
|
||||
/* aabb2d */
|
||||
TEST_DECLARE(glm_aabb2d_sizev)
|
||||
|
||||
/* mat4 */
|
||||
TEST_DECLARE(glm_mat4_ucopy)
|
||||
TEST_DECLARE(glm_mat4_copy)
|
||||
@@ -1274,6 +1277,9 @@ TEST_LIST {
|
||||
TEST_ENTRY(glmc_rotate2d_make)
|
||||
TEST_ENTRY(glmc_rotate2d)
|
||||
TEST_ENTRY(glmc_rotate2d_to)
|
||||
|
||||
/* aabb2d */
|
||||
TEST_ENTRY(glm_aabb2d_sizev)
|
||||
|
||||
/* mat4 */
|
||||
TEST_ENTRY(glm_mat4_ucopy)
|
||||
|
||||
Reference in New Issue
Block a user