summaryrefslogtreecommitdiff
path: root/ocaml/test/test_arvo_slots.ml
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-10-06 23:18:59 +0700
committerpolwex <polwex@sortug.com>2025-10-06 23:18:59 +0700
commit5de3f7a3ad7b0cf63b4a6cbddfc1e26359dea161 (patch)
treeb55b2258123149bed40bd89bbaa58e7da54f3a26 /ocaml/test/test_arvo_slots.ml
parentfdab65f6dac4ba85ed4749f61970660d1132d453 (diff)
cleaned up tests
Diffstat (limited to 'ocaml/test/test_arvo_slots.ml')
-rw-r--r--ocaml/test/test_arvo_slots.ml74
1 files changed, 0 insertions, 74 deletions
diff --git a/ocaml/test/test_arvo_slots.ml b/ocaml/test/test_arvo_slots.ml
deleted file mode 100644
index 5ec9f76..0000000
--- a/ocaml/test/test_arvo_slots.ml
+++ /dev/null
@@ -1,74 +0,0 @@
-(* Test Available Slots on Arvo Core
- *
- * Check what slots are available on the Arvo core we found
- *)
-
-open Nock_lib
-
-let test_slot slot arvo =
- try
- let value = Noun.slot (Z.of_int slot) arvo in
- Printf.printf " Slot %2d: exists (%s)\n" slot
- (if Noun.is_cell value then "cell" else "atom");
- Some value
- with _ ->
- Printf.printf " Slot %2d: does not exist\n" slot;
- None
-
-let test_arvo_slots env =
- Printf.printf "🔍 Testing Available Slots on Arvo Core\n\n";
-
- Eio.Switch.run @@ fun _sw ->
- let fs = Eio.Stdenv.fs env in
-
- (* Load solid pill *)
- let state = State.create () in
- match Boot.boot_from_file ~fs state "solid.pill" with
- | Error msg ->
- Printf.printf "✗ Failed to load pill: %s\n%!" msg
- | Ok () ->
- let pill_root = State.get_arvo state in
-
- Printf.printf "=== Testing PILL ROOT ===\n\n";
- Printf.printf "Testing slots 2-30 on pill root:\n\n";
- List.iter (fun slot -> ignore (test_slot slot pill_root))
- (List.init 29 (fun i -> i + 2));
-
- Printf.printf "\n\n=== Testing ARVO CORE (at depth 8) ===\n\n";
-
- (* Navigate to real Arvo *)
- let path = [3; 3; 2; 3; 2; 3; 3; 2] in
- let rec navigate noun = function
- | [] -> noun
- | slot :: rest ->
- navigate (Noun.slot (Z.of_int slot) noun) rest
- in
- let arvo = navigate pill_root path in
-
- Printf.printf "Testing slots 2-30 on Arvo core:\n\n";
- List.iter (fun slot -> ignore (test_slot slot arvo))
- (List.init 29 (fun i -> i + 2));
-
- Printf.printf "\nLooking for formula slots that might be poke...\n\n";
-
- (* Check if any slot contains a formula (cell starting with opcode) *)
- for slot = 2 to 30 do
- match test_slot slot arvo with
- | Some value when Noun.is_cell value ->
- (match Noun.head value with
- | Noun.Atom z when Z.numbits z < 8 ->
- let opcode = Z.to_int z in
- if opcode >= 0 && opcode <= 11 then
- Printf.printf " Slot %d contains formula with opcode %d\n" slot opcode
- | _ -> ())
- | _ -> ()
- done
-
-let () =
- Printf.printf "\n";
- Printf.printf "═══════════════════════════════════════════════════════════\n";
- Printf.printf " Testing Arvo Core Slots\n";
- Printf.printf "═══════════════════════════════════════════════════════════\n";
- Printf.printf "\n";
-
- Eio_main.run test_arvo_slots