| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This patch takes the former debug message output of a test changing its
state and makes it its own feature, toggleable with the
`ODIN_TEST_LOG_STATE_CHANGES` configurable. The output will be at the
info level and is disabled by default.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
bad_free_array. The bad_free_array remains to not break old code. The new default behavior is implemented in a callback that you can override, there's a second provided callback that provides the old behavior where an element was added to bad_free_array. Rationale: Many people are just checking the allocation_map, but don't check the bad free array. Several examples throughout core that use tracking allocator don't check bad_free_array either, so people have been taught not to check it.
|
| |
|
|
|
|
|
| |
This is needed for the docs generator to generate all the docs for the
posix package, if it is imported like it was on Windows it would
generate docs for the Windows version of the package which has much less
symbols exposed.
|
| | |
|
| |
|
|
| |
in some code generators.
|
| |\ |
|
| | |\
| | |
| | | |
init ansi on a standalone testing exe
|
| | | | |
|
| | |\ \
| | | |
| | | | |
add '#caller_expression'
|
| | | | | |
|
| | |/ /
| | |
| | |
| | |
| | |
| | | |
A thread made inside a test does not share the test index of its parent,
so any time one of those threads failed an assert, it would tell the
runner to shutdown test index zero.
|
| |/ /
| |
| |
| | |
file tag syntax.
|
| |/
|
|
| |
do anything since build tags use OR within the line. So something like //+build !windows, !linux would actually build on both linux and windows. What was intended in all these cases was probably AND, which you get by splitting them into separate lines.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Enable with `-define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true`.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Adds `expect_leak_or_bad_free :: proc(t: ^T, client_test: proc(t: ^T), verifier: Memory_Verifier_Proc)`.
It sets up its own `Tracking_Allocator`, runs the `client_test`, and then calls the `verifier` procedure.
The verifier can then inspect the contents of the tracking allocator and call `testing.expect*` as sensible for the test in question.
Any allocations are then cleared so that the test runner doesn't itself complain about leaks.
Additionally, `ODIN_TEST_LOG_LEVEL_MEMORY` has been added as a define to set the severity of the test runner's memory tracker. You can use `-define:ODIN_TEST_LOG_LEVEL_MEMORY=error` to make tests fail rather than warn if leaks or bad frees have been found.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Fixes `panic` for Darwin.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I am uncertain why this works, but it does. Previously, `rtti_test` was
failing due to non-zero data appearing in the `l_buggy` `Buggy_Struct`.
The issue was caused by calling `runtime.default_random_generator` with
a pointer to the state, somehow. The pointer could be on the stack or in
the heap; it did not matter.
I found two workarounds.
- One is to move the RNG setup behind the call to `free_all`.
- The other is to construct the random generator manually.
Despite my digging and testing, I could find no reason as to why this
works or what the fundamental issue was to begin with. If anyone comes
upon this in the future with direct access to a Windows machine, I
recommend stepping through the program with a debugger to investigate
more deeply into why this happens.
|
| | |
|
| |\
| |
| | |
Add `ODIN_TEST_SHORT_LOGS` define
|
| | |
| |
| |
| |
| | |
Strips out the procedure, date, and time information, for when you just
need to know the file, line, and message.
|
| | |
| |
| |
| | |
This is in line with the old way it worked on Windows.
|
| |/ |
|
| |
|
|
|
|
|
|
| |
Currently, a Ctrl+c starts a graceful shutdown of the tests and runner.
Sometimes tests get stuck and this would never complete.
This simply adds an extra step, if Ctrl+c is given for the second time,
just `os.exit` right away.
|
| |
|
|
|
| |
It would previously just be a compilation error about a missing
return statement.
|
| | |
|
| |
|
|
| |
Works well with `-define:ODIN_TEST_LOG_LEVEL=warning`.
|
| |
|
|
| |
Add `pthread_testcancel` to `core:sys/unix`
|