1 #include "MasterTest.hpp"
3 #include "app/Application.hpp"
4 #include "app/Assets.hpp"
5 #include "app/init.hpp"
6 #include "app/MasterState.hpp"
7 #include "creature/Creature.hpp"
8 #include "world/Simulation.hpp"
10 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(blobs::app::test::MasterTest, "headed");
17 void MasterTest::setUp() {
20 void MasterTest::tearDown() {
24 void MasterTest::testOneSecond() {
28 world::Simulation sim(assets);
29 assets.LoadUniverse("universe", sim);
31 auto blob = new creature::Creature(sim);
32 blob->Name(assets.name.Sequential());
33 Spawn(*blob, sim.PlanetByName("Planet"));
34 // decrease chances of ur-blob dying without splitting
35 blob->GetProperties().Fertility() = 1.0;
38 app::MasterState state(assets, sim);
41 app::Application app(init.window, init.viewport);
42 app.PushState(&state);
44 // just run it for one second and check if anything segfaults or throws
45 for (int t = 0; t < 1000; t += 17) {