You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
479 B

#include "gtest/gtest.h"
#include "sphere.h"
TEST(SphereTest, ConstructorTest) {
Sphere sph(0, 1, 2, 3);
EXPECT_EQ(sph.getOrigin()[0], 0);
EXPECT_EQ(sph.getOrigin()[1], 1);
EXPECT_EQ(sph.getOrigin()[2], 2);
EXPECT_EQ(sph.getRadius(), 3);
}
TEST(SphereTest, ConstructorTest2) {
Sphere sph(0, 1, 2, -3);
EXPECT_EQ(sph.getOrigin()[0], 0);
EXPECT_EQ(sph.getOrigin()[1], 1);
EXPECT_EQ(sph.getOrigin()[2], 2);
EXPECT_EQ(sph.getRadius(), 0);
}