Move main() and test code for basics to C++
This commit is contained in:
parent
6be100e28a
commit
e8a6099158
4 changed files with 36 additions and 197 deletions
20
test/test_basics.cc
Normal file
20
test/test_basics.cc
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* test_basics.c
|
||||
*
|
||||
* Unit tests for the basics module.
|
||||
*
|
||||
* Eryn Wells <eryn@erynwells.me>
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
|
||||
TEST(Vector3Test, OperatorAdd)
|
||||
{
|
||||
Vector3 v1(3, 2, 1), v2(4, 5, 6);
|
||||
Vector3 sum = v1 + v2;
|
||||
EXPECT_EQ(7, sum.x);
|
||||
EXPECT_EQ(7, sum.y);
|
||||
EXPECT_EQ(7, sum.z);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue