Skip to content

Commit

Permalink
Fix tests without JIT support
Browse files Browse the repository at this point in the history
  • Loading branch information
tevador committed Sep 25, 2019
1 parent a3d8300 commit 7c405a7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/tests/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1008,12 +1008,14 @@ int main() {

runTest("Hash test 1e (interpreter)", stringsEqual(RANDOMX_ARGON_SALT, "RandomX\x03"), test_e);

randomx_release_cache(cache);
cache = randomx_alloc_cache(RANDOMX_FLAG_JIT);
currentKey.size = 0;
randomx_destroy_vm(vm);
initCache("test key 000");
vm = randomx_create_vm(RANDOMX_FLAG_JIT, cache, nullptr);
if (RANDOMX_HAVE_COMPILER) {
randomx_release_cache(cache);
cache = randomx_alloc_cache(RANDOMX_FLAG_JIT);
currentKey.size = 0;
randomx_destroy_vm(vm);
initCache("test key 000");
vm = randomx_create_vm(RANDOMX_FLAG_JIT, cache, nullptr);
}

runTest("Hash test 2a (compiler)", RANDOMX_HAVE_COMPILER && stringsEqual(RANDOMX_ARGON_SALT, "RandomX\x03"), test_a);

Expand Down

0 comments on commit 7c405a7

Please sign in to comment.