Commit Graph

69 Commits

Author SHA1 Message Date
Feoramund 7d670f6562 Add initial test suite for core:strconv 2024-06-04 14:20:31 -04:00
Feoramund 890fe07c6e Disable FANCY_OUTPUT in Odin test scripts
This should tidy up the CI output logs a bit.
2024-06-02 14:54:32 -04:00
Jeroen van Rijn 62b7d8de97 Port tests\core\net 2024-06-02 14:47:09 -04:00
Jeroen van Rijn dacb0f7786 Port tests\core\thread 2024-06-02 14:47:09 -04:00
Jeroen van Rijn 5b1ffba915 Port testing\core\time 2024-06-02 14:47:09 -04:00
Jeroen van Rijn a406ff7063 Port tests\core\strings 2024-06-02 14:47:09 -04:00
Jeroen van Rijn 9ba02e888d Port tests\core\slice 2024-06-02 14:47:09 -04:00
Jeroen van Rijn 80b115748f Port tests\core\reflect 2024-06-02 14:47:09 -04:00
Jeroen van Rijn 9829a02571 Port tests\core\odin 2024-06-02 14:47:09 -04:00
Jeroen van Rijn 8383a45b62 Port tests\core\text\match 2024-06-02 14:47:09 -04:00
Jeroen van Rijn b0faab29e0 Port tests\core\math, math\linalg\glsl and math\noise 2024-06-02 14:47:09 -04:00
Jeroen van Rijn d7bfbe0552 Port testing\core\text\i18n 2024-06-02 14:47:08 -04:00
Jeroen van Rijn 39fd73fe17 Port testing\core\hash 2024-06-02 14:47:08 -04:00
Jeroen van Rijn 6f7c5a7577 Port tests\core\fmt 2024-06-02 14:47:08 -04:00
Jeroen van Rijn d334b8c72a Port tests\core\path\filepath 2024-06-02 14:47:08 -04:00
Jeroen van Rijn 9d0f4833bf Port tests\core\encoding\xml
Made them run in parallel as well.
2024-06-02 14:47:08 -04:00
Jeroen van Rijn 6641a6f6c9 Port tests\core\encoding\varint 2024-06-02 14:47:08 -04:00
Jeroen van Rijn 601df0e8f7 Port tests\core\encoding\json 2024-06-02 14:47:08 -04:00
Jeroen van Rijn 1b32e27aa4 Port tests\core\encoding\hxa
And fix a few leaks in `core:encoding/hxa` while at it.
2024-06-02 14:47:08 -04:00
Jeroen van Rijn 40b20fb473 Port tests\core\c\libc 2024-06-02 14:47:08 -04:00
Jeroen van Rijn a27b167218 Update tests\core\encoding\cbor to use new test runner.
It was leaky and required a substantial number of `loc := #caller_location` additions to parts of the core library to make it easier to track down how and where it leaked.

The tests now run fine multi-threaded.
2024-06-02 14:47:07 -04:00
Jeroen van Rijn 6a1649d8aa Update using new defaults for memory + reporting width 2024-06-02 14:47:07 -04:00
Feoramund b7e1ae7073 Change test runner options to SCREAMING_SNAKE_CASE
This commit also changes the name of `test_select` to `ODIN_TEST_NAMES`,
to better conform with the already-existing `-test-name:<name>` option.
2024-06-02 14:47:07 -04:00
Feoramund e11f3d2520 Fix missing - for define in tests/core/build.bat 2024-06-02 14:47:07 -04:00
Jeroen van Rijn a0b2ea6d6e Update tests\core\crypto 2024-06-02 14:46:59 -04:00
Jeroen van Rijn a463e282db Update core:container tests 2024-06-02 14:34:31 -04:00
Jeroen van Rijn e3181c13c6 Update core:compress tests 2024-06-02 14:34:31 -04:00
Jeroen van Rijn eb3d6d7d75 Update core:image tests to use new runner. 2024-06-02 14:34:31 -04:00
Feoramund 852f694bee Get tests passing again
`T` no longer has a writer assigned to it.

`test_core_cbor.odin` has global state and is run with `odin test`,
so I've set it to use only one thread.
2024-06-02 14:34:31 -04:00
Jeroen van Rijn 410876b36a Add core:container/rbtree
Add a red-black tree with configurable $Key and $Value.
Also includes tests that verify it maintains RB invariants, doesn't leak.

Originally based on the CC0 implementation from literateprograms.org.
But reworked to the same API used by @Yawning's excellent `core:container/avl` for ease of use.
2024-05-23 23:00:00 +02:00
Jeroen van Rijn 2250eb3e78 Enable core:fmt tests. 2024-05-10 17:05:18 +02:00
gingerBill d5e6d722d3 Merge pull request #3045 from laytan/cbor
encoding/cbor
2024-04-15 14:28:52 +01:00
Jeroen van Rijn 07ef969546 Fix test label. 2024-03-18 17:05:40 +01:00
Jeroen van Rijn 72c15d7699 Add WiP datetime package and tests.
A new package `core:time/datetime` has been added which can represent moments much further in the past and future than `core:time`.
It is based on *the* reference work on the subject, Calendrical Calculations Ultimate Edition, Reingold & Dershowitz.

More procedures will be added to it in the future, to for example calculate the 3rd Thursday in March to figure out holidays.
The package has been tested for more than a year and can handle dates 25 quadrillion years into the past and future with 64-bit day ordinals, or 5 million with 32-bit ones.

This also fixes a longstanding bug where converting between YYYY-MM:DD hh:mm:ss and `time.Time` and back could result in a mismatch.

RFC 3339 timestamps can now also be parsed using the `core:time` package.
2024-03-18 16:47:16 +01:00
Laytan Laats b6c47e7963 encoding/base64: add decode_into, add tests 2024-03-04 17:26:17 +01:00
Laytan Laats 5533a327eb encoding/cbor: initial package implementation 2024-03-04 17:25:34 +01:00
Yawning Angel 87ab3f5dc8 tests/core/crypto: Use the tests/common boilerplate 2024-03-04 18:20:56 +09:00
Yawning Angel bc160d2eb7 tests/core/crypto: Reorganize
All of our crypto is modern now unless exiled to the legacy sub-package,
so move the test cases for the currently un-unified algorithms into the
main test driver file, and rename the benchmark driver to reflect
reality.
2024-02-07 00:37:18 +09:00
Jeroen van Rijn 4efef08c94 Update core:encoding to Unicode 15.1 table. 2024-01-02 18:03:32 +01:00
Laytan Laats 6024af172c add failing test for runtime arena edge case 2023-12-18 14:40:49 +01:00
Hector 1db5e1250f Binary search improvements
Modified the algorithm so that the index is either the location of the
element if found or the index at which to insert the element to maintain
sorted order.

Also added some tests to verify the above claim.
2023-11-25 13:48:48 +00:00
Laytan Laats 9078ddaf5a Allow larger thread poly data
The poly data currently has the restriction of being less than a
pointer's size, but there is much more space in the `Thread.user_args`
array which can be utilized, this commit allows you to pass types that are
larger than pointer length as long as the total size of the poly data is
less than that of the `Thread.user_args`.
2023-11-15 19:08:03 +01:00
Lucas Perlind c59ad24856 Make tests scripts error if a test fails
Additionally fixes tests that were found broken because
of this.
2023-04-03 16:49:14 +10:00
Colin Davidson 28f7f57247 manually start merging core_net 2023-03-01 07:58:30 -08:00
gingerBill c8f05b7c0c Merge pull request #2269 from Skytrias/luapattern
Add lua pattern matching to core:text with tests
2022-12-22 11:08:10 +00:00
Lucas Perlind f029b4beb1 Add more utility procedures to small array 2022-12-21 13:00:33 +11:00
skytrias bd3596f012 create lua strlib text package and tests 2022-12-18 23:11:23 +01:00
Jeroen van Rijn 36473b2774 Add test for core:slice. 2022-09-01 18:04:48 +02:00
Jeroen van Rijn 09e1c0fa27 [i18n] Add tests. 2022-04-29 16:19:13 +02:00
Jeroen van Rijn 127b0ba65e [xml] Enable tests. 2022-04-28 15:46:36 +02:00