2019-06-06 17:07:24 +02:00
|
|
|
//
|
|
|
|
// Created by Teo-CD on 06/06/19.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
2019-06-07 22:20:34 +02:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Game.h"
|
|
|
|
|
|
|
|
TEST(Setup,LevelSetup)
|
|
|
|
{
|
|
|
|
// 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();
|
|
|
|
}
|