fix headless test case

This commit is contained in:
Konstantin Käfer
2014-04-25 16:12:03 +02:00
parent 666f593803
commit 3e92f36afc
3 changed files with 6 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ public:
~Map();
void start();
void run();
void stop();
/* setup */

View File

@@ -45,8 +45,11 @@ void Map::stop() {
void Map::eventloop(void *arg) {
Map *map = static_cast<Map *>(arg);
map->run();
}
uv_run(map->loop, UV_RUN_DEFAULT);
void Map::run() {
uv_run(loop, UV_RUN_DEFAULT);
}
void Map::setup() {

View File

@@ -105,7 +105,7 @@ TEST(Headless, initialize) {
map.update();
// Run the loop. It will terminate when we don't have any further listeners.
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
map.run();
map.render();