mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
[tests] Make test runners exit with errorlevel 1 if a test fails.
This commit is contained in:
+4
@@ -14,6 +14,7 @@ package test_vendor_botan
|
||||
|
||||
import "core:testing"
|
||||
import "core:fmt"
|
||||
import "core:os"
|
||||
|
||||
import "vendor:botan/md4"
|
||||
import "vendor:botan/md5"
|
||||
@@ -86,6 +87,9 @@ main :: proc() {
|
||||
test_siphash_2_4(&t)
|
||||
|
||||
fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
|
||||
if TEST_fail > 0 {
|
||||
os.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
TestHash :: struct {
|
||||
|
||||
+4
@@ -3,6 +3,7 @@ package test_vendor_glfw
|
||||
import "core:testing"
|
||||
import "core:fmt"
|
||||
import "vendor:glfw"
|
||||
import "core:os"
|
||||
|
||||
GLFW_MAJOR :: 3
|
||||
GLFW_MINOR :: 3
|
||||
@@ -36,6 +37,9 @@ main :: proc() {
|
||||
test_glfw(&t)
|
||||
|
||||
fmt.printf("%v/%v tests successful.\n", TEST_count - TEST_fail, TEST_count)
|
||||
if TEST_fail > 0 {
|
||||
os.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
@(test)
|
||||
|
||||
Reference in New Issue
Block a user