gingerBill
c77e8ca401
Fix tests
2024-08-21 14:06:04 +01:00
gingerBill
58e811eea5
Merge pull request #3962 from Feoramund/regex
...
Add `core:text/regex`
2024-08-21 13:55:11 +01:00
Jeroen van Rijn
3fc1f6f1cd
Merge pull request #4101 from Yawning/feature/index-byte-tweaks
...
core/bytes: Tweak `index_byte`/`last_index_byte`
2024-08-19 20:43:37 +02:00
Yawning Angel
9e65e229d0
core/bytes: Tweak index_byte and last_index_byte
...
- Assume unaligned loads are cheap
- Explicilty use 256-bit or 128-bit SIMD to avoid AVX512
- Limit "vectorized" scanning to 128-bits if SIMD is emulated via SWAR
- Add a few more benchmark cases
2024-08-19 11:40:36 +09:00
Feoramund
b49b80bdf9
Add test for count_digits_of_base
2024-08-18 20:14:14 -04:00
Laytan Laats
f7d7d65bc0
fix open bindings
...
`open` specifies the `mode` argument as vararg (presumably to make it
optional). varargs actually have rules about casting, in this case the
rule that any integer arg of size <= 4 has to be casted to `i32` before
passing it.
Not doing that implicit cast makes the permissions wrong or not apply at
all.
2024-08-16 22:54:53 +02:00
Jeroen van Rijn
6c46c9e04b
Improve benchmarks.
2024-08-16 17:00:16 +02:00
Jeroen van Rijn
f7234e2ed3
Allow ODIN_TEST_LOG_LEVEL override when -debug.
2024-08-14 16:29:51 +02:00
Laytan Laats
f00f68ef6f
posix/os2: fix test and add back in removed temp guard
2024-08-14 01:44:37 +02:00
Laytan Laats
5115aee23f
posix: actually fix netbsd test
2024-08-14 01:44:37 +02:00
Laytan Laats
4a61bac100
posix: fix test on netbsd
2024-08-14 01:44:37 +02:00
Laytan Laats
726891588f
posix: more tests
2024-08-14 01:44:37 +02:00
Laytan Laats
efe68c2e24
posix: add package
2024-08-14 01:44:35 +02:00
Jeroen van Rijn
0d916a659e
Merge pull request #4053 from Feoramund/fix-gitignore
...
Fix `.gitignore`
2024-08-12 21:34:26 +02:00
Feoramund
3a32250b80
Add .gitignore for tests directory
2024-08-12 15:16:52 -04:00
Laytan Laats
a4ac3cc6e8
fix os.read_dir closing the given file descriptor
2024-08-12 18:51:27 +02:00
Laytan
450fc3ec77
Merge pull request #4060 from laytan/support-field-tag-bitsets-in-core-odin
...
core/odin: support field tags on bit_field fields
2024-08-12 13:53:33 +02:00
Laytan Laats
99aa0d3a35
fix type switching over internal pointer union
...
Fixes #3947
2024-08-12 00:02:05 +02:00
Laytan Laats
f0840ed24e
core/odin: support field tags on bit_field fields
...
Fixes #4044
2024-08-11 20:59:54 +02:00
Jeroen van Rijn
e226d37803
Merge pull request #4023 from Feoramund/simd-index
...
Vectorize `index_byte`
2024-08-10 21:01:41 +02:00
Feoramund
4f816aabb3
Use SIMD_SCAN_WIDTH constant in core:bytes test
2024-08-10 13:54:12 -04:00
Jeroen van Rijn
9759d56c81
Merge pull request #4003 from Yawning/feature/crypto-improvements
...
core:crypto: Various improvements
2024-08-10 17:17:00 +02:00
Feoramund
9d2b4b2f03
Simplify core:bytes test
2024-08-10 08:13:22 -04:00
Feoramund
c69fa87d53
Merge core:simd/util into core:bytes
2024-08-10 07:17:03 -04:00
Yawning Angel
ba1ad82c2b
core/crypto/aead: Initial import
2024-08-10 18:32:37 +09:00
Yawning Angel
b381791f42
core/crypto/chacha20: Change API terminology to be consistent with AES
2024-08-10 18:32:37 +09:00
Yawning Angel
14ceb0b19d
core/crypto/chacha20poly1305: Support AEAD_XChaCha20_Poly1305
...
IETF-draft flavor (32-bit counter) though this makes no practical
difference.
2024-08-10 18:32:37 +09:00
Yawning Angel
8efc98ce90
core/crypto/chacha20poly1305: Change the interface to match GCM
2024-08-10 18:32:37 +09:00
Yawning Angel
1f3107e693
core/crypto/chacha20: Use 128-bit/256-bit SIMD
2024-08-10 18:32:37 +09:00
Yawning Angel
708f053fe6
core/crypto/aes: Use NIST terminology for the IV
2024-08-10 18:32:37 +09:00
Yawning Angel
c0f9655ec4
test/core/crypto: Minor changes to AES related tests
...
- Test against the non-standard GCM nonce length vectors
- Fix the CTR mode test to match the comment
Correctness was fine without this change.
2024-08-10 18:32:37 +09:00
Feoramund
e7e7fe766a
Add test for misaligned data to core:simd/util suite
2024-08-09 18:54:04 -04:00
Feoramund
c8a62ee4ec
Make simd_util index procs contextless where applicable
2024-08-09 18:54:04 -04:00
Feoramund
12dd0cb72a
Simplify and make simd_util cross-platform
...
This new algorithm uses a Scalar->Vector->Scalar iteration loop which
requires no masking off of any incomplete data chunks.
Also, the width was reduced to 32 bytes instead of 64, as I found this
to be about as fast as the previous 64-byte x86 version.
2024-08-09 18:54:04 -04:00
Laytan Laats
912f99abc8
encoding/cbor: various fixes
...
- "null" is the proper way to represent the nil value in the diagnostic
format
- hex encoding in diagnostic format was wrong
- struct keys weren't sorted the right deterministic way
2024-08-09 21:56:54 +02:00
Jeroen van Rijn
cc24d2de3e
Merge pull request #3810 from Feoramund/freebsd-core-net
...
Port `core:net` to FreeBSD
2024-08-09 09:50:05 +02:00
Jeroen van Rijn
1e09ff3b2e
Merge pull request #4043 from Kelimion/expect_leak_or_bad_free
...
Allow testing for intentional leaks in test runner
2024-08-08 21:40:17 +02:00
Jeroen van Rijn
b82cfc5f15
Fix shoco heisenleak
2024-08-08 21:15:59 +02:00
Jeroen van Rijn
4d27898418
Use test runner's own tracking allocator.
2024-08-08 20:58:25 +02:00
Jeroen van Rijn
80d1e1ba82
Allow testing for intentional leaks in test runner
...
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.
2024-08-08 20:41:32 +02:00
Jeroen van Rijn
f328929939
Merge pull request #4038 from Hyrtwol/core-sys-windows-rawinput-code
...
Core sys windows rawinput code
2024-08-08 18:23:02 +02:00
Thomas la Cour
a4eeb6ed02
rawinput code
2024-08-08 18:03:59 +02:00
Jeroen van Rijn
94c62fb630
Fix typo.
2024-08-08 18:01:09 +02:00
Jeroen van Rijn
d93f3c63d8
Rename package to test_core_os to fit with the rest of test_*
2024-08-08 17:49:08 +02:00
Jeroen van Rijn
ada3df303e
Allow symlink test to work irrespective of git settings.
2024-08-08 17:46:00 +02:00
Feoramund
0418d27bdf
Add benchmarks for vectorized index_* procs
2024-08-06 15:19:05 -04:00
Feoramund
28c98c2e7a
Add tests for vectorized index_* procs
2024-08-06 15:19:05 -04:00
Feoramund
d0d4f19097
Remove debug line from test
2024-08-05 03:50:41 -04:00
Feoramund
fe754af13d
Add new contribution notes to core:net
2024-08-05 03:05:49 -04:00
Feoramund
42a2297d31
Add core:net tests specifically for FreeBSD
2024-08-05 02:08:48 -04:00