DarkflameServer/tests/dCommonTests/TestNiPoint3.cpp

15 lines
339 B
C++
Raw Normal View History

#include <gtest/gtest.h>
2022-01-03 15:00:21 +00:00
#include "NiPoint3.h"
/**
* @brief Basic test for NiPoint3 functionality
*
*/
TEST(dCommonTests, NiPoint3Test) {
2022-01-03 15:00:21 +00:00
// Check that Unitize works
2022-07-28 13:39:57 +00:00
ASSERT_EQ(NiPoint3(3, 0, 0).Unitize(), NiPoint3::UNIT_X);
2022-01-03 15:00:21 +00:00
// Check what unitize does to a vector of length 0
ASSERT_EQ(NiPoint3::ZERO.Unitize(), NiPoint3::ZERO);
}