mirror of
https://git.recroomarchive.org/Radium/libradhook.git
synced 2026-08-07 09:10:59 +00:00
api changes, check README
This commit is contained in:
20
tests/test_version.cpp
Normal file
20
tests/test_version.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user