Enno Rehling
3aa110cfe6
study/teach: testing some easy edge cases
2016-03-24 13:01:44 +01:00
Enno Rehling
267dafcee5
very basic tests for teach and study
2016-03-24 13:01:43 +01:00
Enno Rehling
be6a7a5e39
refactor test_create_locale
...
- create a mostly functional locale for testing
- use it for test factions
refactor learn_skill injection
- use days, not chance
- fix or mutilate broken tests
2016-03-24 13:01:42 +01:00
Enno Rehling
f97b6c9821
bug: learn_skill was not learning the right skill
...
refactor: further reduce learn_skill_depr usage
2016-03-24 13:01:42 +01:00
Enno Rehling
0464fb629a
remove some dead declarations
2016-03-24 13:01:41 +01:00
Enno Rehling
e75843e5c1
learn_skill tests were unstable because of random progress (disable it)
2016-03-24 13:01:40 +01:00
Enno Rehling
18c8148b74
narrow down test failure to a unit test.
...
learn_skill doesn't use u->number!
2016-03-24 12:59:51 +01:00
Enno Rehling
c91da12883
refactor demon_skillchange to use learn_skill
...
Also extracting it into the study module. No idea yet how I am going to sense this for a test, so the test currently does nothing.
2016-03-24 12:59:50 +01:00
Enno Rehling
af83efca44
rewrite learn_skill to not use the deprecated function.
2016-03-24 12:51:23 +01:00
Enno Rehling
b5a4faa745
deprecate learn_skill taking a double
...
- introduce days-based learn_skill
- add a simple test
2016-03-24 12:51:21 +01:00
Enno Rehling
cae966f4fe
nextborder wurde nicht gelesen, wird aber gebraucht
2016-03-13 09:49:04 +01:00
Enno Rehling
f962ec360e
Merge branch 'master' into develop
...
Conflicts:
src/buildno.h
2016-03-12 15:27:55 +01:00
Enno Rehling
2c6a39ebb0
release version 3.8.6
2016-03-12 15:25:13 +01:00
Enno Rehling
3e6d4ab908
Merge pull request #501 from ennorehling/stm2-bug_2187
...
hotfix: bug 2187 (demon hunger)
2016-03-12 15:23:49 +01:00
Enno Rehling
fcc26bcbf3
fix broken json
2016-03-12 15:06:45 +01:00
Enno Rehling
ff395b2e24
Merge branch 'bug_2187' of https://github.com/stm2/server into stm2-bug_2187
2016-03-12 15:03:06 +01:00
Enno Rehling
95b0a0ad9c
Merge pull request #499 from ennorehling/feature/bug-2194-academy-refactoring
...
academy refactoring for bug 2194
2016-03-11 21:48:56 +01:00
Enno Rehling
ae7d86dae0
just a little bit of refactoring
2016-03-11 21:36:10 +01:00
Enno Rehling
d83bd3bec5
memory leak: finally found that coast leak. bad test was overwriting coasts without free (setting custom coasts in a test is not easy).
2016-03-11 11:52:36 +01:00
Enno Rehling
637054bc22
memory leak: clean up mstream after test
2016-03-11 11:33:45 +01:00
Enno Rehling
b81f9db074
memory leak: free race->parameters
2016-03-11 11:31:05 +01:00
Enno Rehling
cdf6d3992e
memory leak: gamedata store was not released
2016-03-11 10:31:21 +01:00
Enno Rehling
349a67ece3
memory leak: test_create_shiptype and coasts, again
2016-03-11 09:50:18 +01:00
Enno Rehling
42849170f4
memory leak: free this test's local attrib list
2016-03-11 09:47:13 +01:00
Enno Rehling
10e67e2107
always free gamedata (this test uses two)
2016-03-11 09:45:39 +01:00
Enno Rehling
0f792e038f
memory leaks
...
- must free gamedata after close
- clear spellbook and free it
2016-03-11 09:43:16 +01:00
Enno Rehling
be0cc93917
this test is poorly written, and a trap
2016-03-10 23:05:24 +01:00
Enno Rehling
c21d5290ef
memory leak: castorders
...
when you test_create_castorder, you must free_castorder
2016-03-10 22:33:53 +01:00
Enno Rehling
c9e524d161
memory leak: test_group_readwrite leaks an attrib
...
- groups were not clearing attribs when they were destroyed.
- new critbit module fixes leak in cb_erase
2016-03-10 22:30:19 +01:00
Enno Rehling
1920dde717
memory leak: at_keys had no dtor
2016-03-10 21:54:53 +01:00
Enno Rehling
7e98384542
fix some memory leaks
...
- t_free does not free
- free_factions frees the wrong list
- cleanup after attrib test
2016-03-10 13:27:08 +01:00
Enno Rehling
d43265f937
a new test for the happy case of a working academy
...
dependency injection for learn_skill
memory leak fixes (triggers, armor)
2016-03-09 23:20:05 +01:00
Enno Rehling
eea99e2fd3
add missing new files.
2016-03-09 14:52:50 +01:00
Enno Rehling
02cfacd7f8
refactorings
...
- learn_skill from unit.c to study.c
- add academy.c module
2016-03-09 14:52:50 +01:00
Enno Rehling
3d5c7ba8fb
refactoring: move produceexp from unit.c to study.c
2016-03-09 14:50:54 +01:00
Enno Rehling
e1f27448bc
disable broken test.
...
fix test_study_with_teacher (simple optimization was in the wrong place)
2016-03-09 14:50:04 +01:00
Enno Rehling
13f51ab796
create a test that crashes for bug 2194
2016-03-09 14:50:04 +01:00
Enno Rehling
2b62747718
fix datafile reading problems for versions 350 and 351
2016-03-09 14:50:03 +01:00
Enno Rehling
c1786c14ed
Merge pull request #493 from ennorehling/tests-without-files
...
Remove file operations from most tests
2016-03-09 14:39:44 +01:00
Enno Rehling
197241df0d
fix datafile reading problems for versions 350 and 351
2016-02-29 16:18:14 +01:00
Steffen Mecke
e3f27e3571
clean up after your tests, young grashopper
2016-02-28 20:34:37 +01:00
Steffen Mecke
11b8d85167
fixed reversed logic for demon peasant hunger (bug 2187)
...
renamed config variable hunger.demons to hunger.demons.peasant_tolerance and reversed reversed logic in upkeep.c
2016-02-28 16:15:48 +01:00
Steffen Mecke
aa3397a24f
reduced report directory spam
2016-02-28 16:15:47 +01:00
Steffen Mecke
e143843b2c
fixed a few typos in E3 spells (bug 2193)
2016-02-28 14:29:53 +01:00
Enno Rehling
fcc846da95
all of the easy external file tests are eliminated
2016-02-26 20:07:51 +01:00
Enno Rehling
5f923295e6
remove datafiles from save.test.c
...
this should fix intermittent tests on windows.
2016-02-26 19:49:58 +01:00
Enno Rehling
63408501b9
convert another test to read_/write_game
2016-02-26 19:01:28 +01:00
Enno Rehling
3c272fd53f
fix reading and writing curses from test (crash)
...
fix read_game/write_game incomaptibility.
2016-02-26 17:54:25 +01:00
Enno Rehling
ce867af34f
this is a static variable, and it is bad
2016-02-25 23:11:44 +01:00
Enno Rehling
81a2dd9d21
extract read_game and write_game (take a gamedata argument, not filenames)
2016-02-25 19:12:38 +01:00