mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 12:48:14 +00:00
Move assert to implementation file
This commit is contained in:
@@ -149,6 +149,8 @@ thread_terminate :: proc "contextless" (thread: ^Thread, exit_code: int) {
|
|||||||
|
|
||||||
|
|
||||||
_fail_timeout :: proc(t: ^T, duration: time.Duration, loc := #caller_location) {
|
_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) {
|
thread := thread_create(proc(thread: ^Thread) {
|
||||||
t := thread.t
|
t := thread.t
|
||||||
timeout := thread.internal_fail_timeout
|
timeout := thread.internal_fail_timeout
|
||||||
|
|||||||
@@ -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) {
|
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)
|
_fail_timeout(t, duration, loc)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user