From 0f5581f53f73a92d33826c4771553a9683376e67 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 18 Jun 2026 00:08:54 +0200 Subject: Adds unit testing scaffold and build tests --- core/salis.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'core/salis.c') diff --git a/core/salis.c b/core/salis.c index 9f9a3d0..dac9e52 100644 --- a/core/salis.c +++ b/core/salis.c @@ -310,6 +310,7 @@ uint64_t mvec_get_owner(const struct Core *core, uint64_t addr) { // ---------------------------------------------------------------------------- // [section] mutator functions // ---------------------------------------------------------------------------- +#if SEED != 0 #if defined(COMMAND_NEW) uint64_t muta_smix(uint64_t *seed) { assert(seed); @@ -357,6 +358,7 @@ void muta_cosmic_ray(struct Core *core) { #endif } } +#endif // ---------------------------------------------------------------------------- // [section] process functions @@ -491,12 +493,15 @@ void core_init(struct Core *core, uint64_t *seed) { assert(core); assert(seed); - if (*seed) { - core->muta[0] = muta_smix(seed); - core->muta[1] = muta_smix(seed); - core->muta[2] = muta_smix(seed); - core->muta[3] = muta_smix(seed); - } +#if SEED != 0 + assert(*seed); + core->muta[0] = muta_smix(seed); + core->muta[1] = muta_smix(seed); + core->muta[2] = muta_smix(seed); + core->muta[3] = muta_smix(seed); +#else + (void)seed; +#endif core->pnum = CLONES; core->pcap = CLONES; @@ -642,7 +647,9 @@ void core_step(struct Core *core) { proc_kill(core); } +#if SEED != 0 muta_cosmic_ray(core); +#endif core_step(core); } -- cgit v1.2.1