Browse Source

Merge pull request #1829 from totoki-kei/dev/totoki-kei/patch-testing

[testing] Fixed `@(test)` always fails unless `testing.set_fail_timeout` is called
gingerBill 3 years ago
parent
commit
fae60a6b88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/testing/runner_windows.odin

+ 1 - 1
core/testing/runner_windows.odin

@@ -203,7 +203,7 @@ run_internal_test :: proc(t: ^T, it: Internal_Test) {
 		thread.it.p(t)
 		thread.it.p(t)
 		
 		
 		sema_post(&global_fail_timeout_semaphore)
 		sema_post(&global_fail_timeout_semaphore)
-		thread_join_and_destroy(global_fail_timeout_thread)
+		if global_fail_timeout_thread != nil do thread_join_and_destroy(global_fail_timeout_thread)
 		
 		
 		thread.success = true
 		thread.success = true
 		sema_post(&global_threaded_runner_semaphore)
 		sema_post(&global_threaded_runner_semaphore)