Jeroen van Rijn
996175753c
strings.cut without allocation.
2024-09-03 19:02:40 +02:00
gingerBill
6ed4bfeba1
Merge pull request #4186 from Feoramund/fix-4177
...
Return false if `Small_Array` can't append multiple elements
2024-09-03 14:25:15 +01:00
gingerBill
99a3e9a510
Merge pull request #4187 from Feoramund/fix-slice-equal
...
Check for zero-length slices in `slice.equal`
2024-09-03 14:24:45 +01:00
Feoramund
806c87d71d
Check for zero-length slices in slice.equal
2024-09-03 02:48:26 -04:00
Feoramund
309953e0f2
Return false if Small_Array can't append multiple elements
...
Fixes #4177
2024-09-03 01:14:17 -04:00
Feoramund
f6f2c67f37
Add time.time_to_datetime
2024-09-03 00:55:09 -04:00
gingerBill
773703bc83
Merge pull request #4009 from thetarnav/file-tag-parser
...
Add a file tag parser to core:odin/parser
2024-08-30 11:58:18 +01:00
Damian Tarnawski
655610ec87
Satisfy vet
2024-08-29 23:06:50 +02:00
Damian Tarnawski
a28d574272
Add and test match_build_tags
2024-08-29 23:02:49 +02:00
Damian Tarnawski
f93779d425
Parse build_project_name as [][]string
2024-08-29 22:08:01 +02:00
Damian Tarnawski
a10f988020
Move some types to runtime, use reflection instead of lut
2024-08-29 21:12:33 +02:00
Damian Tarnawski
92821300e4
Add a file tag parser to core:odin/parser
2024-08-29 20:52:27 +02:00
Laytan Laats
cca385209b
Remove double close
2024-08-28 19:53:20 +02:00
Laytan Laats
fe2d256468
Properly close the temporary files in io tests
2024-08-28 19:53:20 +02:00
Feoramund
7fa2e56cd9
Add io tests for bufio streams
2024-08-28 19:53:20 +02:00
Feoramund
24a53c246f
Make sure seek succeeds in io.Limited_Reader test setup
2024-08-28 19:53:20 +02:00
Feoramund
b11fa90ed2
Test empty slice usage in io procs
2024-08-28 19:53:20 +02:00
Feoramund
1cd5cbb0e4
Test io unexpected pointer movement
2024-08-28 19:53:20 +02:00
Feoramund
8b40be50b9
Update core:io tests
...
- Relax return value requirements on errors. Only the error is checked,
as there are multiple conflicting return styles throughout the `os`
API.
Some return the error along with `0`, `-1`, or another value. This can
be smoothed out later.
- Test `os2` files now.
- No longer test streams after closing; this is considered similar to a
use-after-free in `os2`.
2024-08-28 19:53:20 +02:00
Feoramund
5b9e9fb822
Add test suite for core:io
2024-08-28 19:53:20 +02:00
Fakhri Mouad
b08c14b710
fix style, ensure we compile with flags -vet -strict-style -disallow-do
2024-08-28 17:52:58 +01:00
Fakhri Mouad
7e4750c303
fix indentation in test file
2024-08-28 17:30:30 +01:00
Fakhri Mouad
967b6d46b2
avoid using do statement in odin codebase
2024-08-28 17:27:27 +01:00
Fakhri Mouad
16503c3b91
Add Win32 procs needed to handle clipboard
2024-08-28 16:36:06 +01:00
Feoramund
1f04f541cf
Fix -vet and -strict-style failures in tests
2024-08-26 16:20:08 -04:00
Feoramund
95d1c29c2a
Free the arenas allocated in test_core_runtime
...
Found by using `-sanitize:address`.
2024-08-26 05:45:24 -04:00
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
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
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
Laytan Laats
a4ac3cc6e8
fix os.read_dir closing the given file descriptor
2024-08-12 18:51:27 +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