Bad test that wasn't running.

master
Zed A. Shaw 7 days ago
parent 097879440d
commit 644ff6edc0
  1. 2
      Makefile
  2. 14
      tests/dinkyecs.cpp

@ -37,7 +37,7 @@ tracy_build:
meson compile -j 10 -C builddir
test: asset_build build
./builddir/runtests "[spatialmap-neighbors]"
./builddir/runtests -d yes
run: build test
ifeq '$(OS)' 'Windows_NT'

@ -157,19 +157,15 @@ TEST_CASE("confirm that the event system works", "[ecs]") {
// just count down and should get the same number
while(world.has_event<GUIEvent>()) {
auto [event, entity, data] = world.recv<GUIEvent>();
REQUIRE(event == GUIEvent::HIT);
REQUIRE(entity == player);
auto &str_data = std::any_cast<string&>(data);
REQUIRE(string{"hello"} == str_data);
i--;
}
REQUIRE(i == 0);
auto [event, entity, data] = world.recv<GUIEvent>();
REQUIRE(event == GUIEvent::HIT);
REQUIRE(entity == player);
auto &str_data = std::any_cast<string&>(data);
REQUIRE(string{"hello"} == str_data);
bool ready = world.has_event<GUIEvent>();
REQUIRE(ready == false);
}

Loading…
Cancel
Save