diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-21 11:47:00 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-21 11:47:00 +0200 |
| commit | 1903d7211ee42286cb45aa77a7c97e3bb131e4d5 (patch) | |
| tree | cba4f52771815f3308314fcfbab601bf150cd928 /tests | |
| parent | 8dc374a6ae43d773eba78a66d850a3733d500988 (diff) | |
Fix early join after start.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/core/runtime/test_core_runtime.odin | 40 | ||||
| -rw-r--r-- | tests/core/sync/chan/test_core_sync_chan.odin | 2 |
2 files changed, 21 insertions, 21 deletions
diff --git a/tests/core/runtime/test_core_runtime.odin b/tests/core/runtime/test_core_runtime.odin index 6bbb9fb8a..65312a523 100644 --- a/tests/core/runtime/test_core_runtime.odin +++ b/tests/core/runtime/test_core_runtime.odin @@ -60,26 +60,26 @@ test_temp_allocator_returns_correct_size :: proc(t: ^testing.T) { @(test) test_init_cap_map_dynarray :: proc(t: ^testing.T) { - m1 := make(map[int]string) - defer delete(m1) - testing.expect(t, cap(m1) == 0) - testing.expect(t, m1.allocator.procedure == context.allocator.procedure) - - ally := context.temp_allocator - m2 := make(map[int]string, ally) - defer delete(m2) - testing.expect(t, cap(m2) == 0) - testing.expect(t, m2.allocator.procedure == ally.procedure) - - d1 := make([dynamic]string) - defer delete(d1) - testing.expect(t, cap(d1) == 0) - testing.expect(t, d1.allocator.procedure == context.allocator.procedure) - - d2 := make([dynamic]string, ally) - defer delete(d2) - testing.expect(t, cap(d2) == 0) - testing.expect(t, d2.allocator.procedure == ally.procedure) + m1 := make(map[int]string) + defer delete(m1) + testing.expect(t, cap(m1) == 0) + testing.expect(t, m1.allocator.procedure == context.allocator.procedure) + + ally := context.temp_allocator + m2 := make(map[int]string, ally) + defer delete(m2) + testing.expect(t, cap(m2) == 0) + testing.expect(t, m2.allocator.procedure == ally.procedure) + + d1 := make([dynamic]string) + defer delete(d1) + testing.expect(t, cap(d1) == 0) + testing.expect(t, d1.allocator.procedure == context.allocator.procedure) + + d2 := make([dynamic]string, ally) + defer delete(d2) + testing.expect(t, cap(d2) == 0) + testing.expect(t, d2.allocator.procedure == ally.procedure) } @(test) diff --git a/tests/core/sync/chan/test_core_sync_chan.odin b/tests/core/sync/chan/test_core_sync_chan.odin index fdac61550..8ede19c7d 100644 --- a/tests/core/sync/chan/test_core_sync_chan.odin +++ b/tests/core/sync/chan/test_core_sync_chan.odin @@ -564,7 +564,7 @@ test_try_select_raw_no_toctou :: proc(t: ^testing.T) { trigger := (cast(^chan.Chan(any))(__global_context_for_test))^ // Notify the thief that we are paused so that it can steal the value. - _ = chan.send(trigger, "signal") + _ = chan.send(trigger, "signal") // Wait for comfirmation of the burglary. _, _ = chan.recv(trigger) |