diff org/body.org @ 69:39e4e1542e4a

updated test-suite
author Robert McIntyre <rlm@mit.edu>
date Fri, 09 Dec 2011 23:11:28 -0600
parents 1381a6ebd08b
children a1e421d9c485
line wrap: on
line diff
     1.1 --- a/org/body.org	Fri Dec 09 21:33:05 2011 -0600
     1.2 +++ b/org/body.org	Fri Dec 09 23:11:28 2011 -0600
     1.3 @@ -131,9 +131,9 @@
     1.4  
     1.5  * Examples
     1.6  
     1.7 -#+srcname: test-body
     1.8 +#+name: test-body
     1.9  #+begin_src clojure
    1.10 -(ns test.body
    1.11 +(ns cortex.test.body
    1.12    (:use (cortex world util body))
    1.13    (:import
    1.14     com.jme3.math.Vector3f
    1.15 @@ -200,7 +200,8 @@
    1.16       Vector3f/ZERO]))
    1.17  
    1.18  (defn test-motor-control
    1.19 -  "You should see a multi-segmented worm-like object fall onto the
    1.20 +  "Testing motor-control:
    1.21 +   You should see a multi-segmented worm-like object fall onto the
    1.22     table and begin writhing and moving."
    1.23    []
    1.24    (let [worm (eve-worm)
    1.25 @@ -227,7 +228,8 @@
    1.26                 (worm-pattern @time)))))))
    1.27  
    1.28  (defn test-proprioception
    1.29 -  "You should see two foating bars, and a printout of pitch, yaw, and
    1.30 +  "Testing proprioception:
    1.31 +   You should see two foating bars, and a printout of pitch, yaw, and
    1.32     roll. Pressing key-r/key-t should move the blue bar up and down and
    1.33     change only the value of pitch. key-f/key-g moves it side to side
    1.34     and changes yaw. key-v/key-b will spin the blue segment clockwise
    1.35 @@ -269,9 +271,7 @@
    1.36         (set-gravity world (Vector3f. 0 0 0))
    1.37         (.setMoveSpeed (.getFlyByCamera world) 50)
    1.38         (.setRotationSpeed (.getFlyByCamera world) 50)
    1.39 -       (light-up-everything world)
    1.40 -       (.setTimer world (NanoTimer.))
    1.41 -       )
    1.42 +       (light-up-everything world))
    1.43       (fn [_ _]
    1.44         (if @move-up?
    1.45           (.applyTorque control
    1.46 @@ -300,7 +300,6 @@
    1.47  
    1.48         (if (= 0 (rem (swap! time inc) 2000))
    1.49           (do
    1.50 -           
    1.51             (apply
    1.52              (comp
    1.53               println-repl
    1.54 @@ -752,7 +751,7 @@
    1.55  <<motor-control>>
    1.56  #+end_src
    1.57  
    1.58 -#+begin_src clojure :tangle ../src/test/body.clj
    1.59 +#+begin_src clojure :tangle ../src/cortex/test/body.clj
    1.60  <<test-body>>
    1.61  #+end_src  
    1.62