Download unify/tests/test_main.cpp from Snapkitty/repoverse: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/Snapkitty/repoverse/resolve/main/unify/tests/test_main.cpp
- Command line
-
hf download hf://Snapkitty/repoverse/unify/tests/test_main.cpp
-
curl -L -o test_main.cpp https://huggingface.co/Snapkitty/repoverse/resolve/main/unify/tests/test_main.cpp
643 Bytes
| int main(int argc, char** argv) { | |
| const char* filter = argc > 1 ? argv[1] : nullptr; | |
| int ran = 0, failed_cases = 0; | |
| for (auto& c : unify_test::registry()) { | |
| if (filter && !std::strstr(c.name, filter)) continue; | |
| int before = unify_test::failures(); | |
| c.fn(); | |
| ran++; | |
| bool ok = unify_test::failures() == before; | |
| if (!ok) failed_cases++; | |
| std::printf("%s %s\n", ok ? " ok " : " FAIL", c.name); | |
| } | |
| std::printf("\n%d tests, %d checks, %d failed\n", ran, unify_test::checks(), failed_cases); | |
| return failed_cases == 0 ? 0 : 1; | |
| } | |