api changes, check README

This commit is contained in:
nexusverypro
2026-07-03 22:00:03 +01:00
parent ca6b22a2b5
commit 35f52a4115
7 changed files with 549 additions and 88 deletions

20
tests/test_version.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include <cassert>
#include "radhook/radhook.h"
int main() {
int major = -1, minor = -1, patch = -1;
RadHookGetVersion(&major, &minor, &patch);
assert(major == RADHOOK_VERSION_MAJOR);
assert(minor == RADHOOK_VERSION_MINOR);
assert(patch == RADHOOK_VERSION_PATCH);
// individual out params may be omitted independently
int onlyMajor = -1;
RadHookGetVersion(&onlyMajor, nullptr, nullptr);
assert(onlyMajor == RADHOOK_VERSION_MAJOR);
// must not crash
RadHookGetVersion(nullptr, nullptr, nullptr);
return 0;
}