Skip to content

Commit b34ad1a

Browse files
committed
Minor tidy
1 parent a2dd22d commit b34ad1a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/webaudio/audioworklet_emscripten_locks.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void initDummy(Dummy* dummy) {
5959
}
6060

6161
void printDummy(Dummy* dummy) {
62-
emscripten_outf("Values: %u, %u, %u", dummy->val0, dummy->val1, dummy->val2);
62+
emscripten_outf("Values: 0x%08X, 0x%08X, 0x%08X", dummy->val0, dummy->val1, dummy->val2);
6363
}
6464

6565
// Run a simple calculation that will only be stable *if* all values are atomically updated
@@ -76,12 +76,14 @@ void runCalcs(Dummy* dummy, int num) {
7676
dummy->val0 /= 4;
7777
dummy->val1 /= 3;
7878
dummy->val2 /= 2;
79+
#ifndef DISABLE_LOCKS
7980
emscripten_lock_release(&testLock);
81+
#endif
8082
}
8183
}
8284

8385
void stopping() {
84-
emscripten_out("Expect: 811100370, 759556424, 723197652");
86+
emscripten_out("Expect: 0x305868D2, 0x2D45E948, 0x2B1B1ED4");
8587
emscripten_out("Ending test");
8688
emscripten_destroy_audio_context(context);
8789
emscripten_force_exit(0);
@@ -133,9 +135,9 @@ bool mainLoop(double time, void* data) {
133135
case TEST_DONE:
134136
printDummy((Dummy*) data);
135137
// 32-bit maths with locks *should* result in these:
136-
assert(((Dummy*) data)->val0 == 811100370
137-
&& ((Dummy*) data)->val1 == 759556424
138-
&& ((Dummy*) data)->val2 == 723197652);
138+
assert(((Dummy*) data)->val0 == 0x305868D2
139+
&& ((Dummy*) data)->val1 == 0x2D45E948
140+
&& ((Dummy*) data)->val2 == 0x2B1B1ED4);
139141
stopping();
140142
return false;
141143
}

0 commit comments

Comments
 (0)