forked from github/server
test: lighhouse size reduction reduces effectiveness
This commit is contained in:
parent
fc80e4b83e
commit
7b7d3cb759
|
@ -25,10 +25,10 @@ bool is_lighthouse(const building_type *btype)
|
|||
}
|
||||
|
||||
/* update_lighthouse: call this function whenever the size of a lighthouse changes
|
||||
* it adds temporary markers to the surrounding regions.
|
||||
* The existence of markers says nothing about the quality of the observer in
|
||||
* the lighthouse, for this may change more frequently.
|
||||
*/
|
||||
* it adds temporary markers to the surrounding regions.
|
||||
* The existence of markers says nothing about the quality of the observer in
|
||||
* the lighthouse, since this may change more frequently.
|
||||
*/
|
||||
void update_lighthouse(building * lh)
|
||||
{
|
||||
region *r = lh->region;
|
||||
|
|
|
@ -122,6 +122,9 @@ static void test_lighthouse_guard(CuTest * tc) {
|
|||
CuAssertIntEquals(tc, true, lighthouse_guarded(r2));
|
||||
CuAssertIntEquals(tc, true, lighthouse_guarded(r3));
|
||||
CuAssertIntEquals(tc, false, lighthouse_guarded(r4));
|
||||
b->size = 1; /* size can go down in destroy_cmd */
|
||||
CuAssertIntEquals(tc, false, lighthouse_guarded(r2));
|
||||
CuAssertIntEquals(tc, false, lighthouse_guarded(r3));
|
||||
test_teardown();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue