diff org/test.org @ 321:702b5c78c2de

gathered all the tests into (run-suite), which should make testing vastly easier.
author Robert McIntyre <rlm@mit.edu>
date Tue, 08 May 2012 08:22:19 -0500
parents bb3f8a4af87f
children 5c398b65d01b
line wrap: on
line diff
     1.1 --- a/org/test.org	Thu Mar 01 06:24:17 2012 -0700
     1.2 +++ b/org/test.org	Tue May 08 08:22:19 2012 -0500
     1.3 @@ -11,9 +11,18 @@
     1.4  #+begin_src clojure 
     1.5  (ns cortex.test
     1.6    (:use cortex.util)
     1.7 -  (:require [cortex.test touch vision body hearing])
     1.8 +  (:require [cortex.test
     1.9 +             body
    1.10 +             vision
    1.11 +             hearing
    1.12 +             touch
    1.13 +             proprioception
    1.14 +             movement
    1.15 +
    1.16 +             ])
    1.17    (:import com.jme3.app.state.AppState
    1.18 -	   com.jme3.system.AppSettings))
    1.19 +	   com.jme3.system.AppSettings)
    1.20 +  (:import (com.jme3.math Triangle Vector3f Vector2f Ray Matrix4f)))
    1.21  
    1.22  (defn run-world
    1.23    "run the simulation and wait until it closes properly."
    1.24 @@ -44,21 +53,34 @@
    1.25    "print the docstring for the test, then run the simulation which it
    1.26    yields, waiting until it is terminated."
    1.27    [test-fn-var]
    1.28 +  (println-repl (:doc (meta test-fn-var)))
    1.29    (println-repl "\n ****************\n")
    1.30 -  (println-repl (:doc (meta test-fn-var)))
    1.31    (run-world ((deref test-fn-var))))
    1.32  
    1.33  (def test-suite
    1.34    "The full test suite for all sensors/effectors."
    1.35 -  [#'cortex.test.touch/test-skin
    1.36 -   #'cortex.test.vision/test-two-eyes
    1.37 -   #'cortex.test.hearing/test-advanced-hearing
    1.38 -   #'cortex.test.body/test-proprioception
    1.39 -   #'cortex.test.body/test-motor-control])
    1.40 +  [#'cortex.test.body/test-worm
    1.41  
    1.42 +   #'cortex.test.vision/test-pipeline
    1.43 +   #'cortex.test.vision/test-worm-vision
    1.44 +
    1.45 +   #'cortex.test.hearing/test-java-hearing
    1.46 +   #'cortex.test.hearing/test-worm-hearing
    1.47 +   
    1.48 +   #'cortex.test.touch/test-basic-touch
    1.49 +   #'cortex.test.touch/test-worm-touch
    1.50 +
    1.51 +   #'cortex.test.proprioception/test-proprioception
    1.52 +
    1.53 +   #'cortex.test.movement/test-worm-movement
    1.54 +   ])
    1.55 +   
    1.56 +   
    1.57 +   
    1.58  (defn run-suite
    1.59    "Run the entire test-suite."
    1.60    []
    1.61 +  (println-repl "\n ****************\n")
    1.62    (dorun (map run-test test-suite)))
    1.63  
    1.64  #+end_src