Add tests for controller fire attempt suppression and usecode interpreter functionality
- Enhanced isometric_controls_tests.cpp to include assertions for controller fire attempt suppression under various conditions. - Added tests for the Usecode interpreter in usecode_vm_tests.cpp, verifying script execution and stack manipulation. - Introduced a new PowerShell script, clean-old-build-artifacts.ps1, to facilitate the cleanup of old build artifacts in specified directories.
This commit is contained in:
parent
49a15602b6
commit
ffb1918f35
41 changed files with 3611 additions and 349 deletions
|
|
@ -51,6 +51,18 @@ int main()
|
|||
assert(commandController.takeCommandRequest()->command == remorse::ControllerCommand::OpenInventory);
|
||||
commandController.handleKeyEvent(0x39, 0, 1, 1, 0);
|
||||
assert(!commandController.takeCommandRequest());
|
||||
assert(remorse::controllerFireAttemptSuppressed(true, 0x39, 1, 1));
|
||||
assert(remorse::controllerFireAttemptSuppressed(true, 0x52, 1, 0));
|
||||
assert(!remorse::controllerFireAttemptSuppressed(true, 0x52, 1, 1));
|
||||
assert(!remorse::controllerFireAttemptSuppressed(true, 0x39, 0, 1));
|
||||
remorse::ControllerActorState sleepingFireActor;
|
||||
sleepingFireActor.lastFireAttemptWentToSleep = true;
|
||||
remorse::ControllerMovementState sleepingFireController;
|
||||
sleepingFireController.setActorState(sleepingFireActor);
|
||||
sleepingFireController.handleKeyEvent(0x39, 0, 1, 1, 1);
|
||||
assert(!sleepingFireController.takeCommandRequest());
|
||||
sleepingFireController.handleKeyEvent(0x52, 0, 1, 1, 1);
|
||||
assert(sleepingFireController.takeCommandRequest()->command == remorse::ControllerCommand::FireWeapon);
|
||||
remorse::ControllerActorState restrictedCommandActor;
|
||||
restrictedCommandActor.mapNumber = 0x40;
|
||||
commandController.setActorState(restrictedCommandActor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue