Add ODIN_TEST_GO_TO_ERROR to print test fail locations in a manner friendly to go-to error in editors

This commit is contained in:
Jeroen van Rijn
2025-11-01 16:11:43 +01:00
parent f005136592
commit 6ea7bdbbe5
2 changed files with 29 additions and 2 deletions
+3
View File
@@ -63,6 +63,9 @@ LOG_STATE_CHANGES : bool : #config(ODIN_TEST_LOG_STATE_CHANGES, false)
USING_SHORT_LOGS : bool : #config(ODIN_TEST_SHORT_LOGS, false)
// Output a report of the tests to the given path.
JSON_REPORT : string : #config(ODIN_TEST_JSON_REPORT, "")
// Print the full file path for failed test cases on a new line
// in a way that's friendly to regex capture for an editor's "go to error".
GO_TO_ERROR : bool : #config(ODIN_TEST_GO_TO_ERROR, false)
get_log_level :: #force_inline proc() -> runtime.Logger_Level {
when LOG_LEVEL == "debug" { return .Debug } else