about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-13 22:03:57 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-13 22:03:57 -0800
commitc1f8217a7c02316823d12f6638573ad7b987ee4f (patch)
tree1f725ad273d49be2d92f0dbfaf71540970382e29
parent73658faa6942321c4f14d58b523eb025e9349358 (diff)
downloadmu-c1f8217a7c02316823d12f6638573ad7b987ee4f.tar.gz
556 - correction: check that *read-move* ran to completion
Getting the concurrent tests right is still proving difficult. Let's see
if things improve with practice.
-rw-r--r--chessboard-cursor.arc.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/chessboard-cursor.arc.t b/chessboard-cursor.arc.t
index 48d63712..473308f3 100644
--- a/chessboard-cursor.arc.t
+++ b/chessboard-cursor.arc.t
@@ -7,7 +7,7 @@
   '((function! main [
       (default-space:space-address <- new space:literal 30:literal/capacity)
       (1:channel-address/raw <- init-channel 3:literal)
-      (r:integer/routine <- fork read-move:fn nil:literal/globals 100:literal/limit)
+      (r:integer/routine <- fork read-move:fn nil:literal/globals 200:literal/limit)
       (c:character <- copy ((#\a literal)))
       (x:tagged-value <- save-type c:character)
       (1:channel-address/raw/deref <- write 1:channel-address/raw x:tagged-value)
@@ -26,13 +26,15 @@
       (sleep until-routine-done:literal r:integer/routine)
      ])))
 ;? (set dump-trace*)
-;? (= dump-trace* (obj whitelist '("schedule" "run")))
+;? (= dump-trace* (obj whitelist '("schedule")))
 (run 'main)
 (each routine completed-routines*
   (awhen rep.routine!error
+;?     (prn "  " r)
     (prn "error - " it)))
-(if (~ran-to-completion 'main)
+(if (~ran-to-completion 'read-move)
   (prn "F - chessboard accepts legal moves (<rank><file>-<rank><file>)"))
+;? (quit)
 
 (reset)
 (new-trace "read-move-quit")
@@ -48,7 +50,7 @@
       (sleep until-routine-done:literal r:integer/routine)
      ])))
 (run 'main)
-(if (~ran-to-completion 'main)
+(if (~ran-to-completion 'read-move)
   (prn "F - chessboard quits on move starting with 'q'"))
 
 (reset)