// The application menubar is retired. Resource id 3 remains an empty compatibility definition so // stale capture probes cannot open a hidden menu or leave MenuBar with an invalid open index. #include "sc2k/ui/menu.hpp" #include #include "test_harness.hpp" int main() { sc2k::ui::MenuBar menu; menu.build_builtin(3); CHECK(menu.tops().empty()); for (int index : {0, 1, 4, 128, 999, -1, -5}) { menu.open_top(index); CHECK(!menu.is_open()); } std::printf("test_menu_open: %s\n", failures ? "FAIL" : "ok"); return failures ? 1 : 0; }