From d1a25796cf8bcc86dcf1a3ab99206398b2f63432 Mon Sep 17 00:00:00 2001 From: Richard Harrington Date: Sun, 28 Jul 2013 13:36:21 -0400 Subject: [PATCH] added some informal tests to core.clj, to test exec/tick-robot --- src/rw/core.clj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rw/core.clj b/src/rw/core.clj index d65e4a0..5cfa85d 100644 --- a/src/rw/core.clj +++ b/src/rw/core.clj @@ -11,3 +11,10 @@ :registers nil :program robot-program-test}) +(def rc "AIM + 5 TO RADAR") +(def rp (create/compile rc)) +(def rs (assoc-in (exec/init-robot rp) [:registers "AIM"] 6)) + +(def t0 (exec/tick-robot rs)) +(def t1 (exec/tick-robot t0)) +(def t3 (exec/tick-robot t1))