Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: add flightTime weapondef test #4056

Merged

Conversation

saurtron
Copy link
Collaborator

@saurtron saurtron commented Dec 22, 2024

Work done

  • Add 'test_flighttime' test.
    • Tests the flightTime weaponDef by enabling and disabling it for some units and firing at targets
      • tests on corbuzz (lrpc), armrock and corstorm (rocket bots)
    • Also tests accuracy weaponDef since otherwise the lrpc wouldn't always hit

Test steps

  • Open a game with map "Quicksilver Remake"
  • Enter console command /runtests flighttime

Screenshots:

flighttime

@saurtron saurtron force-pushed the tests-add-flighttime-test branch from b819202 to e726659 Compare December 22, 2024 12:19
@keelefi
Copy link
Contributor

keelefi commented Dec 29, 2024

I tested this and the test fails:

[Test Runner] =====RUNNING TESTS=====
Unit-, Feature- & Weapon-Def editing is enabled! 
[GlobalLosActionExecutor] global LOS toggled for all allyteams
Speed set to 5.0 [Player]
[Test Runner] ��FAIL����: weapondefs/test_flighttime.lua [621 frames] [4169 ms] | [string "LuaUI/Widgets/tests/weapondefs/test_flighttime.lua"]:82: assertion failed!

I think the problem is that the same parameter shouldAlive is used for both checks. In the first run, shouldAlive is true and therefore the check against the solar passes. However, on the second run shouldAlive is false as we expect the rocket bot to die (which it does), but the solar is still alive as nothing is hitting that.

@saurtron
Copy link
Collaborator Author

saurtron commented Jan 2, 2025

but the solar is still alive as nothing is hitting that.

the lrpc should be hitting the solar, I'll review and see what's going on.

@saurtron
Copy link
Collaborator Author

saurtron commented Jan 3, 2025

I think the problem is that the same parameter shouldAlive is used for both checks. In the first run, shouldAlive is true and therefore the check against the solar passes. However, on the second run shouldAlive is false as we expect the rocket bot to die (which it does), but the solar is still alive as nothing is hitting that.

Found the problem: #4099

@saurtron saurtron merged commit 3bc8500 into beyond-all-reason:master Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants