summaryrefslogtreecommitdiff
path: root/core/salis.c
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2026-07-31 00:06:20 +0200
committerPaul Oliver <contact@pauloliver.dev>2026-07-31 00:11:33 +0200
commit8a4563d6d0c9e81fdaa42f6f760cae2b49cad431 (patch)
tree868a54949ed79b3c1e585365f4f3385bb6bee12f /core/salis.c
parentf2c34b1d2c18270a0327fb4896fa307fae098770 (diff)
Adds unit test framework
Diffstat (limited to 'core/salis.c')
-rw-r--r--core/salis.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/core/salis.c b/core/salis.c
index 93dc842..6cc0725 100644
--- a/core/salis.c
+++ b/core/salis.c
@@ -360,6 +360,13 @@ static void core_save(const struct Core *core, FILE *f) {
arch_core_save(core, f);
}
+void core_event_array_init(struct EventArray *eva) {
+ assert(eva);
+ eva->params.size = sizeof(uint64_t) * MVEC_SIZE;
+ eva->params.in = (Bytef *)eva->data;
+ eva->params.out = (Bytef *)eva->comp;
+}
+
#if defined(COMMAND_NEW)
static void core_assemble_ancestor(struct Core *core) {
assert(core);
@@ -381,13 +388,6 @@ static void core_assemble_ancestor(struct Core *core) {
}
}
-void core_event_array_init(struct EventArray *eva) {
- assert(eva);
- eva->params.size = sizeof(uint64_t) * MVEC_SIZE;
- eva->params.in = (Bytef *)eva->data;
- eva->params.out = (Bytef *)eva->comp;
-}
-
static void core_init(struct Core *core, uint64_t *seed) {
assert(core);
assert(seed);
@@ -460,6 +460,10 @@ static void core_load(struct Core *core, FILE *f) {
fread(core->eeva.data, sizeof(uint64_t), MVEC_SIZE, f);
fread(core->beva.data, sizeof(uint64_t), MVEC_SIZE, f);
+ core_event_array_init(&core->aeva);
+ core_event_array_init(&core->eeva);
+ core_event_array_init(&core->beva);
+
arch_core_load(core, f);
}
#endif