mirror of
https://git.recroomarchive.org/Radium/libradhook.git
synced 2026-08-07 09:10:59 +00:00
20 lines
558 B
C++
20 lines
558 B
C++
#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;
|
|
} |