Files
dorayme/tests/objfile_test.cpp
Godzil c17bfadc76 Started working on parsing OBJ Files.
Why string manipulation is so tedious in C/++ :(
2020-03-05 17:46:40 +00:00

25 lines
679 B
C++

/*
* DoRayMe - a quick and dirty Raytracer
* OBJ File unit tests
*
* Created by Manoël Trapier
* Copyright (c) 2020 986-Studio.
*
*/
#include <objfile.h>
#include <math.h>
#include <gtest/gtest.h>
TEST(OBJFileTest, Ignoring_unrecognised_lines)
{
const char gibberish[] = "There was a young lane named Bright\n"
"who traveled much faster than light\n"
"She set out one day\n"
"in a relative way\n"
"and came back the previous night.\n";
OBJFile parser = OBJFile();
parser.parseOBJFile(gibberish);
ASSERT_EQ(parser.ignoredLines, 5);
}