aboutsummaryrefslogtreecommitdiff
path: root/core/testing/runner.odin
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-06-07 15:13:09 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-06-07 15:13:09 +0200
commitee93d7c05e563512ea41b00cc1347eb59427c500 (patch)
treebe001d7f30c3e5124d270369cea85330113eac24 /core/testing/runner.odin
parent68781f8dd365692aee55099d3e14cb83a115764c (diff)
add error message for unknown test log level
It would previously just be a compilation error about a missing return statement.
Diffstat (limited to 'core/testing/runner.odin')
-rw-r--r--core/testing/runner.odin3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/testing/runner.odin b/core/testing/runner.odin
index c82aa1fda..328186c35 100644
--- a/core/testing/runner.odin
+++ b/core/testing/runner.odin
@@ -53,6 +53,9 @@ get_log_level :: #force_inline proc() -> runtime.Logger_Level {
else when LOG_LEVEL == "warning" { return .Warning }
else when LOG_LEVEL == "error" { return .Error }
else when LOG_LEVEL == "fatal" { return .Fatal }
+ else {
+ #panic("Unknown `ODIN_TEST_LOG_LEVEL`: \"" + LOG_LEVEL + "\", possible levels are: \"debug\", \"info\", \"warning\", \"error\", or \"fatal\".")
+ }
}
}