Basic tests infrastructure

This commit is contained in:
Xiphoseer
2022-01-03 16:00:21 +01:00
parent 203e75ef3d
commit a591dbfe9c
7 changed files with 76 additions and 8 deletions

13
tests/TestNiPoint3.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include <stdexcept>
#include "NiPoint3.h"
#include "CommonCxxTests.h"
int TestNiPoint3(int argc, char** argv) {
// Check that Unitize works
ASSERT_EQ(NiPoint3(3,0,0).Unitize(), NiPoint3::UNIT_X);
// Check what unitize does to a vector of length 0
ASSERT_EQ(NiPoint3::ZERO.Unitize(), NiPoint3::ZERO);
// If we get here, all was successful
return 0;
}