1: Great renaming in pursuit of a CLJC-viable parser. There is still a bug here,

or between here and microworld.engine, because compiled rules which pass all the
unit tests nevertheless fail in integration testing.
This commit is contained in:
simon 2016-09-24 14:20:43 +01:00
parent 88d707a32e
commit 2788cac40f
12 changed files with 64 additions and 52 deletions

View file

@ -1,7 +1,7 @@
(ns mw-parser.bulk-test
(ns microworld.parser.bulk-test
(:use clojure.java.io)
(:require [clojure.test :refer :all]
[mw-parser.bulk :refer :all]))
[microworld.parser.bulk :refer :all]))
(deftest bulk-parsing-test
(testing "Bulk (file) parsing and compilation"

View file

@ -1,9 +1,9 @@
(ns mw-parser.core-test
(ns microworld.parser.core-test
(:use clojure.pprint
mw-engine.core
mw-engine.world)
microworld.engine.core
microworld.engine.world)
(:require [clojure.test :refer :all]
[mw-parser.core :refer :all]))
[microworld.parser.core :refer :all]))
(deftest primitives-tests
(testing "Simple functions supporting the parser"

View file

@ -1,11 +1,11 @@
(ns mw-parser.declarative-test
(ns microworld.parser.declarative-test
(:use clojure.pprint
mw-engine.core
mw-engine.world
mw-engine.utils
mw-parser.utils)
microworld.engine.core
microworld.engine.world
microworld.engine.utils
microworld.parser.utils)
(:require [clojure.test :refer :all]
[mw-parser.declarative :refer :all]))
[microworld.parser.declarative :refer :all]))
(deftest rules-tests
(testing "Rule parser - does not test whether generated functions actually work, just that something is generated!"
@ -485,3 +485,13 @@
(is (= (apply afn (list (get-cell world 2 1) world)) nil)
"Middle cell of the strip is not scrub, so rule should not fire."))))
(deftest regression-2-tests
(testing "Still getting fails althought tests for these fails fail."
(is
(=
(:state
(apply
(compile-rule "if state is scrub then 1 chance in 1 state should be forest")
(list {:state :scrub} {})))
:forest))))

View file

@ -1,11 +1,11 @@
(ns mw-parser.generate-test
(ns microworld.parser.generate-test
(:use clojure.pprint
mw-engine.core
mw-engine.world
mw-engine.utils
mw-parser.utils)
microworld.engine.core
microworld.engine.world
microworld.engine.utils
microworld.parser.utils)
(:require [clojure.test :refer :all]
[mw-parser.generate :refer :all]))
[microworld.parser.generate :refer :all]))
(deftest expressions-tests