safety commit

This commit is contained in:
rajames
2026-10-19 06:35:46 -04:00
parent 63434f3762
commit 5707b07abf
12 changed files with 122 additions and 75 deletions
+3 -4
View File
@@ -452,7 +452,6 @@ int main(void)
CHECK(strstr(tell(10, "RS1"), "UNKNOWN WORD") != NULL && strstr(tell(10, "ZERO"), "UNKNOWN WORD") != NULL, "nor anything POST's cases defined: POST leaves nothing, as in v3: \"%s\"", printed);
CHECK(load(10, "centre.4th") == 0, "she takes in what a node that births needs");
CHECK(load(10, "hera.4th") == 0, "and her own capsule, which makes it Hera");
CHECK(strcmp(tell(10, "(GONE-HOOK) @ 0= ."), "0 ") == 0, "centre.4th has put GONE-DOWN in her (GONE-HOOK)");
CHECK(strcmp(tell(10, "NODE-ME ."), "0 ") == 0 && refused == 0, "she asks where she is, by the word centre.4th made, and is answered");
CHECK(told(10, "(SEAL)"), "that is the system it comes back to");
@@ -717,9 +716,9 @@ int main(void)
CHECK(node_numbered(10)->mem[LOST] == hera_lost && node_numbered(11)->mem[LOST] == 0 && node_numbered(13)->mem[LOST] == 0 && node_numbered(14)->mem[LOST] == 0
&& waiting(10) && waiting(11) && waiting(13) && waiting(14), "nothing was let go in all of this, and all wait again: Hera %ld (%ld before)",
(long)node_numbered(10)->mem[LOST], (long)hera_lost);
/* Review Focus 4 (the final review of step 7): after UNIT-KILL no node still lists a removed node as its
* child -- the next KILL would tell it, and with no way to it that would be an error. */
CHECK(strcmp(tell(10, "20 (WHICH) ."), "-1 ") == 0, "Hera no longer lists node 20 among the nodes she birthed: \"%s\"", printed);
/* Review Focus 4 (the final review of step 7): after UNIT-KILL nothing still holds a removed node as a
* child, and the next KILL tells only the nodes there are. */
CHECK(strcmp(tell(10, "10 0 NODE-CHILD . 10 1 NODE-CHILD . 10 2 NODE-CHILD . 10 3 NODE-CHILD ."), "11 13 14 0 ") == 0, "the kernel lists only the nodes there are as Hera's: \"%s\"", printed);
CHECK(told(10, "14 KILL") && node_numbered(14) == NULL && strcmp(tell(13, "1 2 + ."), "3 ") == 0,
"and a KILL after UNIT-KILL tells only the nodes there are: it completes, and the rest go on: \"%s\"", printed);