[Freeciv-Dev] server sanity checking
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
This implements a function sanity_check() which consistency-checks a number
of things in the server. It is called once a turn, but is also nice to have
when you are coding a function and want to see if the function messes things
up. It gives a nice failed assert when something goes wrong, so there better
not be many bugs :). The call to the function looks like
#if (IS_DEVEL_VERSION || IS_BETA_VERSION)
sanity_check();
#endif
So we don't segfault "production versions".
I have added what checks I could think of off the top of my heads; feel free
to add more.
This would have caught the "railroad without roads" bug Christian Knoke
reported the turn after it occured.
There is also a check for the city available squares getting out of date (bug
reported by christion Knoke), but 1) this happens _very_ often, 2) we know
what causes it, so this is deffed out until that bug is fixed.
-Thue
sanity.diff.bz2
Description: BZip2 compressed data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] server sanity checking,
Thue <=
|
|