mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 09:25:44 +01:00
fix: remove vector unit tests, since this code no longer exists.
This commit is contained in:
@@ -2,14 +2,11 @@
|
|||||||
|
|
||||||
#include "../src/util/conf.h"
|
#include "../src/util/conf.h"
|
||||||
#include "../src/util/types.h"
|
#include "../src/util/types.h"
|
||||||
#include "../src/util/vec/float3.h"
|
|
||||||
#include "t_conf.h"
|
#include "t_conf.h"
|
||||||
#include "t_util.h"
|
#include "t_util.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
testdat tests[] = {
|
testdat tests[] = {
|
||||||
{"", test_float3_norm, &(float3){2.0F, 0.67F, 5.0F} },
|
|
||||||
{"", test_float3_norm, &(float3){0.2F, 0.4F, 0.1F} },
|
|
||||||
{"", test_bswap16, (u16[]){0x11EE, 0xEE11} },
|
{"", test_bswap16, (u16[]){0x11EE, 0xEE11} },
|
||||||
{"", test_bswap32, (u32[]){0x1142ADEE, 0xEEAD4211} },
|
{"", test_bswap32, (u32[]){0x1142ADEE, 0xEEAD4211} },
|
||||||
{"", test_bswap64, (u64[]){0x114266897799ADEE, 0xEEAD997789664211} },
|
{"", test_bswap64, (u64[]){0x114266897799ADEE, 0xEEAD997789664211} },
|
||||||
|
|||||||
@@ -1,23 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <math.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "../src/util/colour32.h"
|
#include "../src/util/colour32.h"
|
||||||
#include "../src/util/compat/bswap.h"
|
#include "../src/util/compat/bswap.h"
|
||||||
#include "../src/util/types.h"
|
#include "../src/util/types.h"
|
||||||
#include "../src/util/vec/float3.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
int test_float3_norm(void *d) {
|
|
||||||
float *arg = d;
|
|
||||||
float3 v = {arg[0], arg[1], arg[2]};
|
|
||||||
float3 r = float3_norm(v);
|
|
||||||
float n = r.x * r.x + r.y * r.y + r.z * r.z;
|
|
||||||
|
|
||||||
// check if the value is within 1 millionth of the one we expect
|
|
||||||
return assert_true(fabsf(n - 1.0F) < 1e-6F);
|
|
||||||
}
|
|
||||||
|
|
||||||
int test_colour32_endianess(void *d) {
|
int test_colour32_endianess(void *d) {
|
||||||
(void)d;
|
(void)d;
|
||||||
colour32 c = {0xFF000000}; // setting just the red channel
|
colour32 c = {0xFF000000}; // setting just the red channel
|
||||||
|
|||||||
Reference in New Issue
Block a user