aboutsummaryrefslogtreecommitdiff
path: root/core/testing/testing.odin
Commit message (Collapse)AuthorAgeFilesLines
* Support deterministic random seeding of testsFeoramund2024-06-021-0/+10
| | | | | | | | Add a new option `ODIN_TEST_RANDOM_SEED` which is picked from the cycle counter at startup, if it's not specified by the user. This number is sent to every test in the `T` struct and reset every test (just in case).
* Refactor the test runnerFeoramund2024-06-021-26/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes - Support multi-threaded testing. - Support `set_fail_timeout` on all platforms. - Display an animated progress report. - Setup all tests with a context logger. - Give all tests their own separate custom allocators. - Support tracking test memory usage. - Display a summary of the failed tests at the end. - Let users select only specific tests to run. - Support copying failed tests to the clipboard to run again. - Support catching SIGINT (CTRL-C) to cancel early. - Record context in cleanup procs. - Write all log messages to STDERR for easy redirection. - Possibly more I've forgotten. New Options - `-define:test_threads=N`: Specify thread count. - `-define:test_thread_memory=B`: Specify initial memory block size in bytes to each thread. - `-define:test_track_memory=true`: Track the memory usage of individual tests. - `-define:test_fancy=false`: Disable animated progress report. - `-define:test_select=package.test_name,...`: Run only select tests. - `-define:test_clipboard=true`: Copy names of failed tests to the clipboard. - `-define:test_progress_width=24`: Change the width of the animated progress bars.
* Merge pull request #3138 from FourteenBrush/mastergingerBill2024-01-291-2/+9
|\ | | | | Add a testing.expectf proc as a way to avoid a tprintf call.
| * Fix typoFourteenBrush2024-01-251-1/+1
| |
| * Need to unpack argsFourteenBrush2024-01-251-1/+1
| |
| * Forgot to include loc paramFourteenBrush2024-01-251-2/+1
| |
| * Add testing.expectfFourteenBrush2024-01-251-0/+8
| |
* | Replace `core:*` to `base:*` where appropriategingerBill2024-01-281-1/+1
|/
* fix: make -vet not complainramn2023-07-091-0/+2
|
* Fix #2637ramn2023-07-081-2/+3
| | | | where testing.expect_value can't compare nils
* Use positional and named arguments within the core librarygingerBill2023-06-211-5/+5
|
* Move assert to implementation filegingerBill2021-10-111-1/+0
|
* Add `testing.expect_value`; Improve `testing.set_fail_timeout`gingerBill2021-10-111-4/+10
|
* Add `testing.set_fail_timeout`gingerBill2021-10-111-4/+19
|
* testing: Strip ; from test runner.Jeroen van Rijn2021-09-071-19/+19
|
* Add `testing.fail_now`gingerBill2021-05-011-0/+9
|
* Make the core:testing runner on windows run in a separate thread to handle ↵gingerBill2021-05-011-2/+5
| | | | crashes in more safe manner
* Add `pkg` field to `testing.Internal_Test`gingerBill2021-03-141-0/+3
|
* `odin test` to work with the new `core:testing` packagegingerBill2021-03-141-0/+68