aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-10-11 20:07:39 +0100
committergingerBill <bill@gingerbill.org>2021-10-11 20:07:39 +0100
commit3a60bee804cd9d8f46ebc8c4998a3777fcb36203 (patch)
tree7c82e1b25ebe7efc53927944dbebab538981560b /core
parentb67e0002c19e60e3cfe8c67b22191be179bc4979 (diff)
Move assert to implementation file
Diffstat (limited to 'core')
-rw-r--r--core/testing/runner_windows.odin2
-rw-r--r--core/testing/testing.odin1
2 files changed, 2 insertions, 1 deletions
diff --git a/core/testing/runner_windows.odin b/core/testing/runner_windows.odin
index 513f1a077..e6bf40807 100644
--- a/core/testing/runner_windows.odin
+++ b/core/testing/runner_windows.odin
@@ -149,6 +149,8 @@ thread_terminate :: proc "contextless" (thread: ^Thread, exit_code: int) {
_fail_timeout :: proc(t: ^T, duration: time.Duration, loc := #caller_location) {
+ assert(global_fail_timeout_thread == nil, "set_fail_timeout previously called", loc)
+
thread := thread_create(proc(thread: ^Thread) {
t := thread.t
timeout := thread.internal_fail_timeout
diff --git a/core/testing/testing.odin b/core/testing/testing.odin
index 63df26c1f..37f9fe4d9 100644
--- a/core/testing/testing.odin
+++ b/core/testing/testing.odin
@@ -99,6 +99,5 @@ expect_value :: proc(t: ^T, value, expected: $T, loc := #caller_location) -> boo
set_fail_timeout :: proc(t: ^T, duration: time.Duration, loc := #caller_location) {
- assert(global_fail_timeout_thread == nil, "set_fail_timeout previously called", loc)
_fail_timeout(t, duration, loc)
} \ No newline at end of file