rP22754 Changed IID_DamageReceiver to IID_Resistance, which ought to be IID_Health in test_Damage.js. See rP22754#42632.
Details
Details
- Reviewers
wraitii - Commits
- rP23738: Use IID_Health in test_Damage after rP22754.
Run test, one can check that the functions *are* called now by inserting a warn or fiddling with values to make it fail.
Diff Detail
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Nice catch :)
I think you could usefully craft something with my new 'Spy' method to check that the functions are actually called.
let mock = AddMock(64, IID_Health, { "TakeDamage": (effectData, __, ___, mult) => { TS_ASSERT_EQUALS(mult * (effectData.Hack + effectData.Pierce + effectData.Crush), 0); return { "killed": false, "change": -mult * (effectData.Hack + effectData.Pierce + effectData.Crush) }; } }); let callSpy = new Spy(mock, "TakeDamage") TS_ASSERT(callSpy._called == 1)
Maybe not useful for all of them.
Comment Actions
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2316/display/redirect