Files
liquidraver 159c086485 repo: publish the host regression suite; consolidate .gitignore
- tests/ (114 host cases over production sources), the CI workflow
  (ASan/UBSan on PRs and master pushes) and REGRESSION_TEST_PLAN.md
  are tracked
- .gitignore grouped and deduplicated (173 -> 96 lines, same ignored set)
2026-09-25 21:56:48 +02:00

25 lines
954 B
C++

#include "test.h"
#include <iostream>
#include <set>
int main(int argc, char **argv)
{
std::set<std::string> ids;
for (const auto& test : testCases()) {
if (!ids.insert(test.id).second) { std::cerr << "duplicate ID\n"; return 2; }
}
if (argc == 2 && std::string(argv[1]) == "--list") {
for (const auto& test : testCases()) std::cout << test.id << '\t' << test.name << '\n';
return testCases().empty() ? 2 : 0;
}
if (argc == 3 && std::string(argv[1]) == "--case") {
for (const auto& test : testCases()) if (test.id == std::string(argv[2])) {
try { test.run(); std::cout << "PASS " << test.id << '\n'; return 0; }
catch (const std::exception& error) { std::cerr << error.what() << '\n'; return 1; }
catch (...) { std::cerr << "unknown exception\n"; return 1; }
}
}
std::cerr << "Usage: zephcore_unit --list | --case <exact-id>\n";
return 2;
}