Project_Maat/tests/gTests.cpp

28 lines
602 B
C++
Raw Normal View History

2019-06-06 17:07:24 +02:00
//
// Created by Teo-CD on 06/06/19.
//
#include <gtest/gtest.h>
#include <vector>
#include "Game.h"
TEST(Setup,GameSetup)
{
// TODO : Think about parsing from file ? Currently cumbersome and error-prone
std::vector<std::string> textures = {"Head_Boy.png","Head_Significant_Boy.png","Building.png"};
std::vector<std::string> levels = {"test_level.xml"};
Game game(levels,textures);
ASSERT_FALSE(game);
game.loadLevel(0);
ASSERT_TRUE(game);
game.runGame();
}
2019-06-06 17:07:24 +02:00
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc,argv);
return RUN_ALL_TESTS();
}