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
Laytan Laats
8e855155fd
fix bad import
2024-08-31 02:38:07 +02: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
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