Checks horn key transitions, network messages and repeated-frame behavior.
Subsystem: Audio and physiological effects
Fixture/harness: vehiclehorntests
Setup: The standalone VehicleHornTests harness owns the inputs, local helpers and assertion sink used by the case files below.
Build/entry point: Tests/VehicleHornTests.vcxproj; declared configurations: Debug|Win32, Release|Win32.
VehicleHornTests.cpp
Source: Tests/VehicleHornTests.cpp
Entry-point checks
Fixture: Vehicle Horn tests
Case symbol: main
Source: Tests/VehicleHornTests.cpp:12
- Test
- Entry-point checks: held input does not send or restart every frame; focus loss or input suppression sends stop; held loop never restarts attack.
Source check messages (including original failure wording)
-
press emits start
-
held input does not send or restart every frame
-
release emits stop
-
repeated release is silent
-
next press starts anew
-
focus loss or input suppression sends stop
-
idle has no release sound
-
new request plays attack once
-
attack finishes before sustain
-
attack completion starts loop
-
held loop never restarts attack
-
release immediately stops sustain and plays tail
-
tail completes without retrigger
-
tail finishes to silence
-
short tap interrupts unfinished attack
-
repress interrupts release with new attack
-
key release cannot cancel crash latch
-
repair cannot cancel held input
-
last request ending releases horn
-
one vehicle stopping cannot silence another
-
last vehicle stopping releases shared voice
-
leaving gameplay resets playback without an extra tail
VehicleHornFrameFixture.h
Source: Tests/VehicleHornFrameFixture.h
Run
Fixture: Vehicle Horn tests
Case symbol: Run
Source: Tests/VehicleHornFrameFixture.h:61
- Test
- Checks simulator entry immediately stops horn sections and clears playback/source-mix state without a release tail.
Source check messages (including original failure wording)
-
simulator entry immediately stops every horn section without a release tail
-
simulator entry clears playback and cached source mix
-
manual/received and crash horns play outside the simulator
-
only our own horn receives attached-camera mixing
-
held horn advances to sustain
-
ordinary release plays its tail outside the simulator
-
simulator entry clears local held input
-
leaving simulator cannot replay a finished horn or cached tail
-
simulated remote vehicles cannot emit manual or crash horns
-
new real-world input works after simulator exit
-
focus loss still releases the real-world horn