Files
onionHEN/source/util/tests/test_main.cpp
T
Hexwell 7ea2ba30c5 feat(cheats): sync cheat catalogs over HTTPS zip download
Replace the git clone/fetch pipeline with a curl + miniz HTTPS
ZIP download. The engine streams one archive, extracts only the
catalog roots, and reuses flatten to install flat files, so the
libgit2 submodule and its build integration are gone.

Drop the pre-download reachability probe and the commit-SHA
parser; reachability is implied by the download itself and the
SHA only fed the old git flow. Mirror selection stays in
CheatMirrorFactory (auto: cnb.cool for zh-Hans, GitHub otherwise;
explicit github/cnb skips fallback).

curl verifies peer+host against the embedded CA bundle and now
distinguishes certificate time-skew from other verification
failures, surfacing a dedicated clock notification. Revert the
util CMake target back to "util" now that libgit2 no longer
claims that name.
2026-08-18 15:41:08 +08:00

86 lines
3.3 KiB
C++

#include <cstdio>
extern "C" int test_cheat_utils_suite(void);
extern "C" int test_cheat_parsers_suite(void);
extern "C" int test_cheat_repository_suite(void);
extern "C" int test_cheat_flatten_suite(void);
extern "C" int test_payload_suite(void);
extern "C" int test_base64_suite(void);
extern "C" int test_aes_cbc_suite(void);
extern "C" int test_hde64_suite(void);
extern "C" int test_hotpatch_suite(void);
extern "C" int test_x64_relocator_suite(void);
extern "C" int test_git_mirror_factory_suite(void);
extern "C" int test_cheat_catalog_suite(void);
extern "C" int test_cheat_sync_suite(void);
extern "C" int test_reg_entity_suite(void);
extern "C" int test_settings_suite(void);
extern "C" int test_ready_suite(void);
extern "C" int test_platform_fs_suite(void);
extern "C" int test_platform_log_suite(void);
extern "C" int test_platform_net_suite(void);
extern "C" int test_platform_notify_suite(void);
extern "C" int test_msg_protocol_suite(void);
extern "C" int test_app_jailbreak_policy_suite(void);
extern "C" int test_debug_settings_route_policy_suite(void);
extern "C" int test_ipc_harden_suite(void);
extern "C" int test_toolbox_timing_suite(void);
extern "C" int test_toolbox_injection_suite(void);
extern "C" int test_trampoline_arena_suite(void);
extern "C" int test_hook_lifecycle_suite(void);
extern "C" int test_hijack_retry_suite(void);
extern "C" int test_ps5_settings_ui_suite(void);
extern "C" int test_toolbox_route_suite(void);
extern "C" int test_onpress_policy_suite(void);
extern "C" int test_toolbox_helpers_suite(void);
extern "C" int test_toolbox_i18n_suite(void);
extern "C" int test_overlay_text_metrics_suite(void);
int main() {
int failures = 0;
failures += test_cheat_utils_suite();
failures += test_cheat_parsers_suite();
failures += test_cheat_repository_suite();
failures += test_cheat_flatten_suite();
failures += test_payload_suite();
failures += test_base64_suite();
failures += test_aes_cbc_suite();
failures += test_hde64_suite();
failures += test_hotpatch_suite();
failures += test_x64_relocator_suite();
failures += test_git_mirror_factory_suite();
failures += test_cheat_catalog_suite();
failures += test_cheat_sync_suite();
failures += test_reg_entity_suite();
failures += test_settings_suite();
failures += test_ready_suite();
failures += test_platform_fs_suite();
failures += test_platform_log_suite();
failures += test_platform_net_suite();
failures += test_platform_notify_suite();
failures += test_msg_protocol_suite();
failures += test_app_jailbreak_policy_suite();
failures += test_debug_settings_route_policy_suite();
failures += test_ipc_harden_suite();
failures += test_toolbox_timing_suite();
failures += test_toolbox_injection_suite();
failures += test_trampoline_arena_suite();
failures += test_hook_lifecycle_suite();
failures += test_hijack_retry_suite();
failures += test_ps5_settings_ui_suite();
failures += test_toolbox_route_suite();
failures += test_onpress_policy_suite();
failures += test_toolbox_helpers_suite();
failures += test_toolbox_i18n_suite();
failures += test_overlay_text_metrics_suite();
if (failures == 0) {
std::fprintf(stderr, "All util host tests passed.\n");
return 0;
}
std::fprintf(stderr, "%d util host tests failed.\n", failures);
return 1;
}