|
34 | 34 | (defn mock-prosperity-humidity-multiplier-at []
|
35 | 35 | (fn [world pos] 1.0))
|
36 | 36 |
|
37 |
| -(deftest test-not-everyone-dies-immediately |
| 37 | +(deftest ^:acceptance test-not-everyone-dies-immediately |
38 | 38 | (with-redefs [crand-int (mock-crand-int)
|
39 | 39 | crand-float (mock-crand-float)]
|
40 | 40 | (let [g0 (generate-game w77 10)
|
41 | 41 | g (reduce (fn [g _] (turn g)) g0 (repeat 10 :_))]
|
42 | 42 | (is (> (game-total-pop g) 0)))))
|
43 | 43 |
|
44 |
| -(deftest test-population-do-not-expand-too-much-too-fast |
| 44 | +(deftest ^:acceptance test-population-do-not-expand-too-much-too-fast |
45 | 45 | (with-redefs [crand-int (mock-crand-int)
|
46 | 46 | crand-float (mock-crand-float)]
|
47 | 47 | (let [g0 (generate-game w77 10)
|
|
67 | 67 | (is (> final-pop (* start-pop min-factor)))
|
68 | 68 | (is (< final-pop (* start-pop max-factor))))))
|
69 | 69 |
|
70 |
| -(deftest test-population-in-a-sand-desert |
| 70 | +(deftest ^:acceptance test-population-in-a-sand-desert |
71 | 71 | (check-biome com.github.lands.Biome/SAND_DESERT 0.5 1.3 30 10))
|
72 | 72 |
|
73 | 73 | ; We do not want to drop too drammatically and it should not increase too much
|
74 |
| -(deftest test-population-in-a-grassland |
| 74 | +(deftest ^:acceptance test-population-in-a-grassland |
75 | 75 | (check-biome com.github.lands.Biome/GRASSLAND 0.9 1.8 30 10))
|
76 | 76 |
|
77 | 77 | ; We do not want to drop too drammatically and it should not increase too much
|
78 |
| -(deftest test-population-in-a-savanna |
| 78 | +(deftest ^:acceptance test-population-in-a-savanna |
79 | 79 | (check-biome com.github.lands.Biome/SAVANNA 0.9 1.5 30 10))
|
80 | 80 |
|
81 | 81 | ; We do not want to drop too drammatically and it should not increase too much
|
82 |
| -(deftest test-population-in-a-forest |
| 82 | +(deftest ^:acceptance test-population-in-a-forest |
83 | 83 | (check-biome com.github.lands.Biome/FOREST 0.9 1.6 30 10))
|
84 | 84 |
|
85 | 85 | ; We do not want to drop too drammatically and it should not increase too much
|
86 |
| -(deftest test-population-in-a-jungle |
| 86 | +(deftest ^:acceptance test-population-in-a-jungle |
87 | 87 | (check-biome com.github.lands.Biome/JUNGLE 0.9 1.7 30 10))
|
88 | 88 |
|
89 |
| -(deftest test-long-lasting-population-in-grassland |
| 89 | +(deftest ^:acceptance test-long-lasting-population-in-grassland |
90 | 90 | (check-biome com.github.lands.Biome/GRASSLAND 2.0 1000.0 50 100))
|
91 | 91 |
|
92 |
| -(deftest test-long-lasting-population-in-savanna |
| 92 | +(deftest ^:acceptance test-long-lasting-population-in-savanna |
93 | 93 | (check-biome com.github.lands.Biome/SAVANNA 0.8 10.0 50 100))
|
94 | 94 |
|
95 | 95 | (def game-scenario-w77-100tribes-30turns
|
|
101 | 101 | g (reduce (fn [g _] (turn g)) g0 (repeat nturns :_))]
|
102 | 102 | g)))
|
103 | 103 |
|
104 |
| -(deftest test-some-societies-remain-nomadic |
| 104 | +(deftest ^:acceptance test-some-societies-remain-nomadic |
105 | 105 | (let [ g game-scenario-w77-100tribes-30turns
|
106 | 106 | societies (groups-alive g)
|
107 | 107 | nsocieties-total (.size societies)
|
|
115 | 115 | (is (and (>= nsocieties-still-nomadic 10) (<= nsocieties-still-nomadic 60)))
|
116 | 116 | ))
|
117 | 117 |
|
118 |
| -(deftest test-some-societies-become-semi-sedentary |
| 118 | +(deftest ^:acceptance test-some-societies-become-semi-sedentary |
119 | 119 | (let [ g game-scenario-w77-100tribes-30turns
|
120 | 120 | societies (groups-alive g)
|
121 | 121 | nsocieties-total (.size societies)
|
|
125 | 125 | (is (and (>= nsocieties-semi-sedentary 10) (<= nsocieties-semi-sedentary 55)))
|
126 | 126 | ))
|
127 | 127 |
|
128 |
| -(deftest test-some-societies-become-sedentary |
| 128 | +(deftest ^:acceptance test-some-societies-become-sedentary |
129 | 129 | (let [ g game-scenario-w77-100tribes-30turns
|
130 | 130 | societies (groups-alive g)
|
131 | 131 | nsocieties-total (.size societies)
|
|
134 | 134 | nsocieties-sedentary (.size (filter sedentary? societies))]
|
135 | 135 | (is (and (>= nsocieties-sedentary 3) (<= nsocieties-sedentary 15)))))
|
136 | 136 |
|
137 |
| -(deftest test-some-discover-agriculture |
| 137 | +(deftest ^:acceptance test-some-discover-agriculture |
138 | 138 | (let [ g game-scenario-w77-100tribes-30turns
|
139 | 139 | societies (groups-alive g)
|
140 | 140 | nsocieties-agriculture (.size (filter #(know? % :agriculture) societies))]
|
141 | 141 | (when verbose-acceptance-tests
|
142 | 142 | (println "scenario-w77-100tribes-30turns agriculture" nsocieties-agriculture))
|
143 | 143 | (is (and (>= nsocieties-agriculture 3) (<= nsocieties-agriculture 25)))))
|
144 | 144 |
|
145 |
| -(deftest test-some-most-do-not-discover-agriculture |
| 145 | +(deftest ^:acceptance test-some-most-do-not-discover-agriculture |
146 | 146 | (let [ g game-scenario-w77-100tribes-30turns
|
147 | 147 | societies (groups-alive g)
|
148 | 148 | nsocieties-no-agriculture (.size (filter #(not (know? % :agriculture)) societies))]
|
149 | 149 | (when verbose-acceptance-tests
|
150 | 150 | (println "scenario-w77-100tribes-30turns no agriculture" nsocieties-no-agriculture))
|
151 | 151 | (is (and (>= nsocieties-no-agriculture 35) (<= nsocieties-no-agriculture 90)))))
|
152 | 152 |
|
153 |
| -(deftest test-some-societies-are-band |
| 153 | +(deftest ^:acceptance test-some-societies-are-band |
154 | 154 | (let [ g game-scenario-w77-100tribes-30turns
|
155 | 155 | societies (groups-alive g)
|
156 | 156 | target (.size (filter band-society? societies))]
|
157 | 157 | (when verbose-acceptance-tests
|
158 | 158 | (println "scenario-w77-100tribes-30turns band" target))
|
159 | 159 | (is (and (>= target 10) (<= target 85)))))
|
160 | 160 |
|
161 |
| -(deftest test-some-societies-are-tribe |
| 161 | +(deftest ^:acceptance test-some-societies-are-tribe |
162 | 162 | (let [ g game-scenario-w77-100tribes-30turns
|
163 | 163 | societies (groups-alive g)
|
164 | 164 | target (.size (filter tribe-society? societies))]
|
165 | 165 | (when verbose-acceptance-tests
|
166 | 166 | (println "scenario-w77-100tribes-30turns tribe" target))
|
167 | 167 | (is (and (>= target 5) (<= target 35)))))
|
168 | 168 |
|
169 |
| -(deftest test-no-societies-are-yet-chiefdom |
| 169 | +(deftest ^:acceptance test-no-societies-are-yet-chiefdom |
170 | 170 | (let [ g game-scenario-w77-100tribes-30turns
|
171 | 171 | societies (groups-alive g)
|
172 | 172 | target (.size (filter chiefdom-society? societies))]
|
|
0 commit comments