From 5dee2b16d5a8656b7146bfc1156d20389b0acd7c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 10 Apr 2018 14:04:51 +0200 Subject: [PATCH] tests/update: Belatedly update for commit 35ecc008c Commit 35ecc008c fixed take_casualties() to destroy land units only when casualties demand it. This test demonstrated the change: inf#29 no longer dies. Good. However, this lost coverage of land units dying in a sucessful defense. Bad. I could tweak inf#29 to get destroyed again, but that would lose coverage of the bug fixed by commit 35ecc008c. Make linf#28 die instead. Signed-off-by: Markus Armbruster --- tests/update/final.xdump | 17 +++++++++-------- tests/update/journal.log | 30 +++++++++++++++--------------- tests/update/setup-POGO | 6 +++--- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/tests/update/final.xdump b/tests/update/final.xdump index e9989606e..569eebbc3 100644 --- a/tests/update/final.xdump +++ b/tests/update/final.xdump @@ -103,8 +103,8 @@ owner xloc yloc des effic mobil off loyal terr0 terr1 terr2 terr3 dterr xdist yd 1 2 6 18 100 120 0 0 0 0 0 0 0 2 6 292 0 100 0 18 0 0 0 0 0 1 650 0 0 0 0 2 0 0 84 0 0 45 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 1 4 6 18 100 120 0 0 0 0 0 0 0 4 6 36 0 100 0 18 0 0 0 0 0 1 130 0 0 0 0 58 0 0 97 0 0 9999 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 1 6 6 4 39 120 0 0 0 0 0 0 0 6 6 39 0 100 0 4 0 0 0 0 0 1 130 0 0 0 0 0 0 0 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 -1 8 6 19 100 120 0 0 0 0 0 0 0 8 6 564 0 100 0 19 0 0 0 0 0 1 1000 0 0 0 0 0 0 0 70 0 5 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 -1 10 6 26 100 120 0 0 0 0 0 0 0 10 6 544 0 100 0 26 0 0 0 0 0 1 1000 0 0 0 0 0 0 0 70 0 0 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 +1 8 6 19 100 120 0 0 0 0 0 0 0 8 6 564 0 100 0 19 0 0 0 0 0 1 1000 0 0 0 0 0 0 0 70 0 5 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 +1 10 6 26 100 120 0 0 0 0 0 0 0 10 6 544 0 100 0 26 0 0 0 0 0 1 1000 0 0 0 0 0 0 0 70 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 1 12 6 14 100 120 0 0 0 0 0 0 0 12 6 571 0 100 0 14 0 0 0 0 0 1 1000 10 0 0 0 0 0 0 70 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 1 14 6 12 100 120 0 0 0 0 0 0 0 14 6 440 0 100 1 12 0 0 0 0 0 1 1000 0 0 0 0 0 0 0 70 0 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 1 -16 6 29 100 120 0 0 0 0 0 0 0 -16 6 3 0 100 1 29 0 0 0 0 0 1 130 1 0 0 0 0 25 15 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 @@ -133,10 +133,10 @@ owner xloc yloc des effic mobil off loyal terr0 terr1 terr2 terr3 dterr xdist yd 1 -1 7 4 39 120 0 0 0 0 0 0 0 -1 7 39 0 100 0 4 0 0 0 0 0 1 130 1 0 0 0 0 0 0 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 6 0 8 5 100 120 0 0 0 0 0 0 0 0 8 395 0 100 1 5 0 0 0 0 0 6 650 20 0 0 0 0 0 0 84 0 400 400 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 6 2 8 4 100 120 0 0 0 0 0 0 0 2 8 254 0 100 1 4 0 0 0 0 0 6 650 19 0 0 0 0 0 0 83 0 384 394 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 -6 4 8 19 100 120 0 0 0 0 0 0 0 4 8 408 0 100 1 19 0 0 0 0 0 6 650 20 0 0 0 0 0 0 83 0 391 395 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 +6 4 8 19 100 120 0 0 0 0 0 0 0 4 8 408 0 100 1 19 0 0 0 0 0 6 650 20 0 0 0 0 0 0 83 0 391 396 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 6 6 8 14 100 120 0 0 0 0 0 0 0 6 8 387 0 100 1 14 0 0 0 0 0 6 650 18 0 0 0 0 0 0 84 0 386 396 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 6 8 8 12 100 120 0 0 0 0 0 0 0 8 8 445 0 100 1 12 0 0 0 0 0 6 650 20 0 0 0 0 0 0 83 0 400 400 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 -6 10 8 26 100 120 0 0 0 0 0 0 0 10 8 358 0 100 1 26 0 0 0 0 0 6 650 20 0 0 0 0 0 0 84 0 391 396 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 +6 10 8 26 100 120 0 0 0 0 0 0 0 10 8 358 0 100 1 26 0 0 0 0 0 6 650 20 0 0 0 0 0 0 84 0 391 395 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 6 12 8 14 100 120 0 0 0 0 0 0 0 12 8 366 0 100 1 14 0 0 0 0 0 6 650 19 0 0 0 0 0 0 83 0 393 398 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 6 14 8 12 100 120 0 0 0 0 0 0 0 14 8 395 0 100 1 12 0 0 0 0 0 6 650 20 0 0 0 0 0 0 83 0 400 400 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 7 -16 8 4 100 120 0 0 0 0 0 0 0 -16 8 295 0 100 1 4 0 0 0 0 0 7 650 20 0 0 0 0 0 0 83 0 400 400 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 @@ -381,7 +381,7 @@ uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship h 25 0 -12 -8 20 0 -20 1 170 0 0 none 0 "" -1 0 42 () "" 0 0 0 0 0 0 0 0 9 0 0 0 0 0 healthy 0 -1 0 26 0 -12 -8 2 0 -10 1 50 0 0 none 0 "" -1 0 42 () "" 0 0 0 0 0 0 0 0 10 0 0 0 0 0 healthy 0 -1 0 27 0 -12 -8 20 0 -20 0 170 0 0 none 0 "" -1 0 42 () "" 0 0 0 0 0 0 0 0 9 0 0 0 0 0 healthy 0 -1 0 -28 4 -8 -8 1 76 48 0 50 0 0 none 0 "" -1 0 42 () "" 0 14 0 0 0 0 0 0 9 0 0 0 0 0 healthy 0 -1 0 +28 0 -8 -8 1 0 -12 0 50 0 0 none 0 "" -1 0 42 () "" 0 0 0 0 0 0 0 0 9 0 0 0 0 0 healthy 0 -1 0 29 4 -6 -8 2 14 47 0 50 0 0 none 0 "" -1 0 42 () "" 0 24 0 0 0 0 0 0 8 0 0 0 0 0 healthy 0 -1 0 30 2 -16 0 2 88 60 0 50 0 0 none 0 "" -1 0 42 () "" 0 100 0 0 0 0 0 0 7 0 0 0 0 0 healthy 0 -1 0 31 2 -16 0 2 10 60 0 50 0 0 none 0 "" -1 0 42 () "" 0 100 0 0 0 0 0 0 7 0 0 0 0 0 healthy 0 -1 0 @@ -426,9 +426,9 @@ cnum stat flags cname passwd ip userid xcap ycap xorg yorg update tgms ann timeu 0 deity (flash beep coastwatch sonar techlists) "POGO" "peter" "127.0.0.1" "tester" 0 0 0 0 0 0 0 45 255 0 0 123456764 0 0 0 0 0.00000 0.00000 0.00000 0.00000 1 active (flash beep coastwatch sonar techlists) "1" "1" "127.0.0.1" "tester" 0 0 0 0 0 1 0 15 255 0 0 10795 0 0 0 0 102.920 3.48828 21.0945 12.3379 2 active (flash beep coastwatch sonar techlists) "2" "2" "127.0.0.1" "tester" -2 0 0 0 0 1 0 15 255 0 975 -6221 0 0 0 0 101.147 1.74414 15.2381 2.74222 -3 active (flash beep coastwatch sonar techlists) "3" "3" "127.0.0.1" "tester" 1 -1 0 0 0 1 0 15 255 0 0 4337 0 0 0 0 101.147 1.74414 15.2381 4.44444 -4 active (flash beep coastwatch sonar techlists) "4" "4" "127.0.0.1" "tester" -1 -1 0 0 0 1 0 15 255 0 0 17644 0 0 0 0 31.5848 1.74414 3.04762 4.44444 -5 active (flash beep coastwatch sonar techlists) "5" "5" "127.0.0.1" "tester" -16 -8 0 0 0 1 0 15 255 0 0 26437 0 0 0 0 101.147 1.74414 15.2381 4.44444 +3 active (flash beep coastwatch sonar techlists) "3" "3" "127.0.0.1" "tester" 1 -1 0 0 0 1 0 15 255 0 0 4338 0 0 0 0 101.147 1.74414 15.2381 4.44444 +4 active (flash beep coastwatch sonar techlists) "4" "4" "127.0.0.1" "tester" -1 -1 0 0 0 1 0 15 255 0 0 17680 0 0 0 0 31.5848 1.74414 3.04762 4.44444 +5 active (flash beep coastwatch sonar techlists) "5" "5" "127.0.0.1" "tester" -16 -8 0 0 0 1 0 15 255 0 0 26438 0 0 0 0 101.147 1.74414 15.2381 4.44444 6 active (flash beep coastwatch sonar techlists) "6" "6" "127.0.0.1" "tester" 0 8 0 0 0 1 0 15 255 0 0 24353 0 0 0 0 101.147 1.74414 15.2381 4.44444 7 active (flash beep coastwatch sonar techlists) "7" "7" "127.0.0.1" "tester" -2 8 0 0 0 1 0 15 255 0 0 25719 0 0 0 0 101.147 1.74414 15.2381 4.44444 /config @@ -467,6 +467,7 @@ timestamp owner type id x y 0 4 0 0 -12 -8 0 4 3 25 -12 -8 0 4 3 26 -12 -8 +0 4 3 28 -8 -8 0 4 0 0 -16 -6 0 4 0 0 -8 -6 /config diff --git a/tests/update/journal.log b/tests/update/journal.log index 850ff1814..7934cac90 100644 --- a/tests/update/journal.log +++ b/tests/update/journal.log @@ -487,7 +487,7 @@ Play#0 output Play#0 1 2 32 22% 7.1K 1.9K 0 0 0 0 1 5 3 3 3 100 Play#0 output Play#0 1 528.93 Play#0 output Play#0 1 4 64 8% 25K 1.3K 0 0 0 20K 21 4.0K 0 10 19 25K - Play#0 output Play#0 1 305.26 + Play#0 output Play#0 1 304.86 Play#0 output Play#0 1 3 64 14% 17K 170 0 0 0 0 0 0 0 0 0 -100 Play#0 output Play#0 1 251.70 Play#0 output Play#0 1 6 8 88% 4.0K 168 0 0 0 0 0 0 3 1 3 25K @@ -751,8 +751,8 @@ Play#0 output Play#0 1 1 2,6 k .......... .......... 0 0 0 2 0 0 0 0 45 0 Play#0 output Play#0 1 1 4,6 k .......... .......... 0 0 0 58 0 0 0 0 9999 0 Play#0 output Play#0 1 1 6,6 - .......... .......... 0 0 0 0 0 0 0 0 0 0 - Play#0 output Play#0 1 1 8,6 f .......... .......... 0 0 0 0 0 0 0 5 16 0 - Play#0 output Play#0 1 1 10,6 ! .......... .......... 0 0 0 0 0 0 0 0 14 0 + Play#0 output Play#0 1 1 8,6 f .......... .......... 0 0 0 0 0 0 0 5 15 0 + Play#0 output Play#0 1 1 10,6 ! .......... .......... 0 0 0 0 0 0 0 0 13 0 Play#0 output Play#0 1 1 12,6 * .......... .......... 0 0 0 0 0 0 0 0 8 0 Play#0 output Play#0 1 1 14,6 h .......... .......... 0 0 0 0 0 0 0 40 0 0 Play#0 output Play#0 1 1 -15,7 t .......... .......... 0 0 0 0 5 0 25 1 0 0 @@ -1089,7 +1089,7 @@ Play#0 output Play#0 1 0 happiness, 0 education produced Play#0 output Play#0 1 total pop was 16045, yielding 0.00 hap, 0.00 edu Play#0 output Play#0 1 1.7834 technology (0.0000 + 1.7834), 1.7551 research (0.0000 + 1.7551) produced - Play#0 output Play#0 1 money delta was $4437 for this update + Play#0 output Play#0 1 money delta was $4438 for this update Play#0 output Play#0 6 0 640 Play#0 input nation 3 Play#0 command nation @@ -1097,7 +1097,7 @@ Play#0 output Play#0 1 (#3) 3 Nation Report Thu Jan 1 00:00:00 1970 Play#0 output Play#0 1 Nation status is ACTIVE Bureaucratic Time Units: 640 Play#0 output Play#0 1 100% eff capital at 1,-1 has 9999 civilians & 0 military - Play#0 output Play#0 1 The treasury has $4337.00 Military reserves: 0 + Play#0 output Play#0 1 The treasury has $4338.00 Military reserves: 0 Play#0 output Play#0 1 Education.......... 15.24 Happiness....... 4.44 Play#0 output Play#0 1 Technology.........101.15 Research........ 1.74 Play#0 output Play#0 1 Technology factor : 50.19% Plague factor : 1.98% @@ -1372,8 +1372,9 @@ Play#0 output Play#0 1 Partisans take over -12,-8! Play#0 output Play#0 1 Guerrilla warfare in -10,-8 Play#0 output Play#0 1 body count: troops: 10, rebels: 5 + Play#0 output Play#0 1 linf light infantry #28 dies fighting guerrillas in -8,-8 Play#0 output Play#0 1 Guerrilla warfare in -8,-8 - Play#0 output Play#0 1 body count: troops: 7, rebels: 22 + Play#0 output Play#0 1 body count: troops: 21, rebels: 22 Play#0 output Play#0 1 Guerrilla warfare in -6,-8 Play#0 output Play#0 1 body count: troops: 26, rebels: 52 Play#0 output Play#0 1 Revolutionary subversion reported in -13,-7! @@ -1412,8 +1413,8 @@ Play#0 output Play#0 1 0 happiness, 0 education produced Play#0 output Play#0 1 total pop was 24024, yielding 0.00 hap, 0.00 edu Play#0 output Play#0 1 1.7834 technology (0.0000 + 1.7834), 1.7551 research (0.0000 + 1.7551) produced - Play#0 output Play#0 1 Army delta $-786, Navy delta $-300, Air force delta $0 - Play#0 output Play#0 1 money delta was $-7356 for this update + Play#0 output Play#0 1 Army delta $-750, Navy delta $-300, Air force delta $0 + Play#0 output Play#0 1 money delta was $-7320 for this update Play#0 output Play#0 6 0 640 Play#0 input nation 4 Play#0 command nation @@ -1421,7 +1422,7 @@ Play#0 output Play#0 1 (#4) 4 Nation Report Thu Jan 1 00:00:00 1970 Play#0 output Play#0 1 Nation status is ACTIVE Bureaucratic Time Units: 640 Play#0 output Play#0 1 100% eff capital at -1,-1 has 130 civilians & 0 military - Play#0 output Play#0 1 The treasury has $17644.00 Military reserves: 0 + Play#0 output Play#0 1 The treasury has $17680.00 Military reserves: 0 Play#0 output Play#0 1 Education.......... 3.05 Happiness....... 4.44 Play#0 output Play#0 1 Technology......... 31.58 Research........ 1.74 Play#0 output Play#0 1 Technology factor : 35.23% Plague factor : 1.29% @@ -1681,9 +1682,8 @@ Play#0 output Play#0 1 5 20 inf infantry -16,-8 20% 0 0 60 10 50 42% 0 0 Play#0 output Play#0 1 5 21 inf infantry -14,-8 20% 0 0 60 10 50 42% 0 0 Play#0 output Play#0 1 4 24 spy infiltrato -12,-8 100% 0 0 60 0 170 42% 0 0 - Play#0 output Play#0 1 4 28 linf light infa -8,-8 76% 14 0 48 9 50 42% 0 0 Play#0 output Play#0 1 4 29 inf infantry -6,-8 14% 24 0 47 8 50 42% 0 0 - Play#0 output Play#0 1 15 units + Play#0 output Play#0 1 14 units Play#0 output Play#0 6 0 640 Play#0 input read 5 Play#0 command read @@ -1699,7 +1699,7 @@ Play#0 output Play#0 1 total pop was 190, yielding 0.00 hap, 0.00 edu Play#0 output Play#0 1 1.7834 technology (0.0000 + 1.7834), 1.7551 research (0.0000 + 1.7551) produced Play#0 output Play#0 1 Army delta $-60, Navy delta $0, Air force delta $0 - Play#0 output Play#0 1 money delta was $1437 for this update + Play#0 output Play#0 1 money delta was $1438 for this update Play#0 output Play#0 6 0 640 Play#0 input nation 5 Play#0 command nation @@ -1707,7 +1707,7 @@ Play#0 output Play#0 1 (#5) 5 Nation Report Thu Jan 1 00:00:00 1970 Play#0 output Play#0 1 Nation status is ACTIVE Bureaucratic Time Units: 99 Play#0 output Play#0 1 No capital (was at -16,-8). - Play#0 output Play#0 1 The treasury has $26437.00 Military reserves: 0 + Play#0 output Play#0 1 The treasury has $26438.00 Military reserves: 0 Play#0 output Play#0 1 Education.......... 15.24 Happiness....... 4.44 Play#0 output Play#0 1 Technology.........101.15 Research........ 1.74 Play#0 output Play#0 1 Technology factor : 50.19% Plague factor : 1.98% @@ -1763,10 +1763,10 @@ Play#0 output Play#0 1 sect sgpidbolhr sgpidbolhr sh gun pet iron dust bar oil lcm hcm rad Play#0 output Play#0 1 6 0,8 c .......... .......... 0 0 0 0 0 0 0 400 400 0 Play#0 output Play#0 1 6 2,8 - .......... .......... 0 0 0 0 0 0 0 384 394 0 - Play#0 output Play#0 1 6 4,8 f .......... .......... 0 0 0 0 0 0 0 391 395 0 + Play#0 output Play#0 1 6 4,8 f .......... .......... 0 0 0 0 0 0 0 391 396 0 Play#0 output Play#0 1 6 6,8 * .......... .......... 0 0 0 0 0 0 0 386 396 0 Play#0 output Play#0 1 6 8,8 h .......... .......... 0 0 0 0 0 0 0 400 400 0 - Play#0 output Play#0 1 6 10,8 ! .......... .......... 0 0 0 0 0 0 0 391 396 0 + Play#0 output Play#0 1 6 10,8 ! .......... .......... 0 0 0 0 0 0 0 391 395 0 Play#0 output Play#0 1 6 12,8 * .......... .......... 0 0 0 0 0 0 0 393 398 0 Play#0 output Play#0 1 6 14,8 h .......... .......... 0 0 0 0 0 0 0 400 400 0 Play#0 output Play#0 1 8 sectors diff --git a/tests/update/setup-POGO b/tests/update/setup-POGO index 5537a8b2f..8c2980542 100644 --- a/tests/update/setup-POGO +++ b/tests/update/setup-POGO @@ -121,11 +121,11 @@ edit u 25 U 24 T spy | win shootout in loyal sector (no takeover) edit l -10,-8 x 20 X 4 give m -10,-8 10 -| lose shootout, linf#28 survives +| lose shootout, linf#28 dies edit l -8,-8 x 22 X 4 O 2 l 50 give m -8,-8 1 -edit u 20 U 28 L -8,-8 T linf m 20 -| lose shootout, inf#29 dies +edit u 20 U 28 L -8,-8 T linf e 15 m 20 +| lose shootout, inf#29 survives edit l -6,-8 x 52 X 4 O 2 l 50 edit u 20 U 29 L -6,-8 e 40 m 50 | military to direct moving che -- 2.43.0