DarkflameServer/tests/TestNiPoint3.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
367 B
C++
Raw Permalink Normal View History

2022-01-03 15:00:21 +00:00
#include <stdexcept>
#include "NiPoint3.h"
#include "CommonCxxTests.h"
2022-01-05 09:06:34 +00:00
int TestNiPoint3(int argc, char** const argv) {
2022-01-03 15:00:21 +00:00
// 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;
}