Correctly getting the build signature properties into the MANIFEST.MF
on build, now testing I'm clearing them down again before commit.
This commit is contained in:
parent
5d3f79567b
commit
0e140a4666
4 changed files with 47 additions and 21 deletions
23
test/mw_engine/heightmap_test.clj
Normal file
23
test/mw_engine/heightmap_test.clj
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
(ns mw-engine.heightmap-test
|
||||
(:require [clojure.test :refer :all]
|
||||
[mw-engine.heightmap :refer :all]
|
||||
[clojure.math.combinatorics :as combo]))
|
||||
|
||||
(deftest apply-heightmap-test
|
||||
(testing "Heightmap functionality"
|
||||
(let [world (apply-heightmap "heightmaps/test9x9.png")
|
||||
altitudes (map #(:altitude %) (flatten world))
|
||||
gradients (map #(:gradient %) (flatten world))]
|
||||
(is (= (count world) 9) "World should be 9x9")
|
||||
(is (= (count (first world)) 9) "World should be 9x9")
|
||||
(is (= (count (remove nil? altitudes)) 81)
|
||||
"All cells should have altitude")
|
||||
(is (= (count (remove nil? gradients)) 81)
|
||||
"All cells should have gradient")
|
||||
(is (> (apply max altitudes)
|
||||
(apply min altitudes))
|
||||
"There should be a range of altitudes")
|
||||
(is (> (apply + gradients) 0)
|
||||
"At least some gradients must be positive, none should be negative")
|
||||
)))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue