From: Giovanni Mascellani gmascellani@codeweavers.com
--- dlls/xactengine3_7/tests/xact3.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/xactengine3_7/tests/xact3.c b/dlls/xactengine3_7/tests/xact3.c index 6b66af59ff0..9e964d7aa0b 100644 --- a/dlls/xactengine3_7/tests/xact3.c +++ b/dlls/xactengine3_7/tests/xact3.c @@ -172,11 +172,8 @@ static void WINAPI notification_cb(const XACT_NOTIFICATION *notification) data->received = TRUE; ok(notification->type == data->type, "Unexpected notification type %u\n", notification->type); - if(notification->type == XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED) - { - ok(notification->waveBank.pWaveBank == data->wave_bank, "Unexpected wave bank %p instead of %p\n", + ok(notification->waveBank.pWaveBank == data->wave_bank, "Unexpected wave bank %p instead of %p\n", notification->waveBank.pWaveBank, data->wave_bank); - } ok(thread_id == data->thread_id, "Unexpected thread id %#lx instead of %#lx\n", thread_id, data->thread_id); }
Alistair Leslie-Hughes (@alesliehughes) commented about dlls/xactengine3_7/tests/xact3.c:
data->received = TRUE; ok(notification->type == data->type, "Unexpected notification type %u\n", notification->type);
- if(notification->type == XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED)
You need to explicitly check the Notification type.
For example, if a CUE Notification was received, it could possible give an access volition. NOTE: Maybe not with the wavebank structure as it only contains one structure but if we expand the tests in the future it will be required.
On Tue Jul 26 09:27:40 2022 +0000, Alistair Leslie-Hughes wrote:
You need to explicitly check the Notification type. For example, if a CUE Notification was received, it could possible give an access volition. NOTE: Maybe not with the wavebank structure as it only contains one structure but if we expand the tests in the future it will be required.
Hi, I somehow missed this comment 6 months ago...
Right now the test only registers `XACTNOTIFICATIONTYPE_WAVEBANKPREPARED` and `XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED` notifications, and does nothing with CUE, so I don't think it should receive a CUE notification at all, should it?
Should the test be expanded in the future to receive other type of notifications, then it would become appropriate to test the notification type before doing other checks.