From b7fa127c8273c43453527ac4790e7a015abb549a Mon Sep 17 00:00:00 2001 From: joern274 Date: Sun, 3 Mar 2024 10:43:35 +0100 Subject: [PATCH] Debug output added to understand MacOS test failure --- tests/netlist/module.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/netlist/module.cpp b/tests/netlist/module.cpp index 1c85e69f817..a117838f640 100644 --- a/tests/netlist/module.cpp +++ b/tests/netlist/module.cpp @@ -1293,8 +1293,20 @@ namespace hal { // Trigger the event trigger_event[event_idx](); + Gate* gg = test_nl->get_gate_by_id(MIN_GATE_ID); + Module* mm = test_mod; + if (gg && mm) + { + for (ModulePin* mp : mm->get_pins()) + std::cerr << "Module pin " << mp->get_id() << " <" << mp->get_name() << ">" << std::endl; + for (Endpoint* ep : gg->get_fan_in_endpoints()) + std::cerr << "Gate in pin " << ep->get_pin()->get_id() << " <" << ep->get_pin()->get_name() << ">" << std::endl; + for (Endpoint* ep : gg->get_fan_out_endpoints()) + std::cerr << "Gate out pin " << ep->get_pin()->get_id() << " <" << ep->get_pin()->get_name() << ">" << std::endl; + } EXPECT_EQ(listener.get_event_count(), 1); + std::cerr << "Event " << event_idx << " <" << std::get<2>(listener.get_last_parameters()) << "> exp=<" << std::get<2>(expected_parameter[event_idx]) << ">" << std::endl; EXPECT_EQ(listener.get_last_parameters(), expected_parameter[event_idx]); // Unregister the callback