mirror of
https://github.com/recp/cglm.git
synced 2025-12-24 04:22:36 +00:00
test boilerplate
This commit is contained in:
16
test/src/test_perlin.h
Normal file
16
test/src/test_perlin.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* 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, perlin) {
|
||||
vec4 p = {1.0f, 2.0f, 3.0f, 4.0f};
|
||||
|
||||
float out = GLM(perlin)(p);
|
||||
ASSERT(test_eq(out, 10.0f))
|
||||
TEST_SUCCESS
|
||||
}
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "test_quat.h"
|
||||
#include "test_project.h"
|
||||
#include "test_plane.h"
|
||||
#include "test_perlin.h"
|
||||
#include "test_affine.h"
|
||||
#include "test_affine2d.h"
|
||||
#include "test_affine_mat.h"
|
||||
@@ -69,6 +70,7 @@
|
||||
#include "test_quat.h"
|
||||
#include "test_project.h"
|
||||
#include "test_plane.h"
|
||||
#include "test_perlin.h"
|
||||
#include "test_affine.h"
|
||||
#include "test_affine2d.h"
|
||||
#include "test_affine_mat.h"
|
||||
|
||||
@@ -356,6 +356,10 @@ TEST_DECLARE(glmc_project)
|
||||
TEST_DECLARE(glm_plane_normalize)
|
||||
TEST_DECLARE(glmc_plane_normalize)
|
||||
|
||||
/* perlin */
|
||||
TEST_DECLARE(glm_perlin)
|
||||
TEST_DECLARE(glmc_perlin)
|
||||
|
||||
/* utils */
|
||||
TEST_DECLARE(clamp)
|
||||
|
||||
@@ -1533,6 +1537,10 @@ TEST_LIST {
|
||||
/* plane */
|
||||
TEST_ENTRY(glm_plane_normalize)
|
||||
TEST_ENTRY(glmc_plane_normalize)
|
||||
|
||||
/* perlin */
|
||||
TEST_ENTRY(glm_perlin)
|
||||
TEST_ENTRY(glmc_perlin)
|
||||
|
||||
/* utils */
|
||||
TEST_ENTRY(clamp)
|
||||
|
||||
Reference in New Issue
Block a user