[FEAT] Add test and Tuplus object
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @Author: NADAL Jean-Baptiste
|
||||
* @Date: 07/02/2021
|
||||
*
|
||||
@@ -30,10 +30,13 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
// Demonstrate some basic assertions.
|
||||
TEST(HelloTest, BasicAssertions) {
|
||||
// Expect two strings not to be equal.
|
||||
EXPECT_STRNE("hello", "world");
|
||||
// Expect equality.
|
||||
EXPECT_EQ(7 * 6, 42);
|
||||
#include "tuple.h"
|
||||
|
||||
TEST(RaytracerTuple, CreateBasicTuple)
|
||||
{
|
||||
Raytracer::Tuple t(4.3, -4.2, 3.1, 1.0);
|
||||
EXPECT_FLOAT_EQ(t.x(), 4.3);
|
||||
EXPECT_FLOAT_EQ(t.y(), -4.2);
|
||||
EXPECT_FLOAT_EQ(t.z(), 3.1);
|
||||
EXPECT_FLOAT_EQ(t.w(), 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user