fix headless test case
This commit is contained in:
@@ -27,6 +27,7 @@ public:
|
||||
~Map();
|
||||
|
||||
void start();
|
||||
void run();
|
||||
void stop();
|
||||
|
||||
/* setup */
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user