gingerBill
bb429696f8
Merge pull request #4877 from laytan/os2-additions
...
os/os2: recursive directory walker, expose errors in read_directory, file clone
2025-02-28 14:37:47 +00:00
Feoramund
6054b921db
Add tests for new safe to_cstring
2025-02-27 18:54:38 -05:00
Laytan Laats
0e4140a602
os/os2: recursive directory walker, expose errors in read_directory, file clone
...
Adds a directory walker, a method of exposing and retrieving errors from
the existing read directory iterator, allows reusing of the existing
read directory iterator, and adds a file clone procedure
2025-02-24 20:40:44 +01:00
Laytan Laats
55302280d8
fix addrinfo struct def
...
Fixes #4816
2025-02-12 19:24:27 +01:00
gingerBill
4ea96bd1c9
Merge pull request #4779 from jkenda/master
...
encoding/json: marshal enumerated arrays to objects with key-value pairs
2025-02-08 08:01:36 +00:00
Laytan Laats
5defddffd0
reorganize tests and handle endian
2025-02-06 21:44:34 +01:00
Laytan Laats
9241d7c698
add tests for abs() on floats
2025-02-06 21:20:15 +01:00
jkenda
51b80c5a20
encoding/json: marshal enumerated arrays to objects with key-value pairs
2025-02-01 10:32:07 +01:00
Laytan Laats
b673642412
os/os2: add get_executable_path and get_executable_directory
2025-01-21 18:54:45 +01:00
avanspector
9868c8292b
Merge branch 'master' of https://github.com/avanspector/Odin
2025-01-10 06:42:42 +01:00
avanspector
a704000c34
Haiku: add posix tests
2025-01-10 06:42:19 +01:00
gingerBill
2a29322c91
Merge pull request #4605 from karl-zylinski/tracking-allocator-bad-free-default-to-crash
...
Make tracking allocator default to crashing on a bad free instead of adding to bad_free_array
2025-01-08 16:24:20 +00:00
gingerBill
a3b4280cf7
Merge pull request #4633 from spahnke/fix-matrix-adjugate
...
Fix matrix adjugate
2025-01-06 09:36:18 +00:00
gingerBill
5df699abf2
Add #+feature dynamic-literals to test
2025-01-05 14:03:08 +00:00
gingerBill
3d984d75cc
Add #+feature dynamic-literals to tests
2025-01-05 14:00:23 +00:00
gingerBill
a300a860ec
Add #+feature dynamic-literals to tests
2025-01-05 13:46:58 +00:00
fleandro
1550eced04
also add a test for non power of 2 N for good measure
2025-01-03 16:58:03 +00:00
fleandro
c93e096d8f
fix N=1 and cleanup tests
2025-01-03 16:50:05 +00:00
fleandro
555bca2cb4
fix test leaks
2025-01-03 15:46:02 +00:00
fleandro
e3de02eaa8
runtime: map_cell_index_static produced wrong results when the number of elements per cell was a power of 2
2025-01-03 15:33:34 +00:00
Sebastian Pahnke
b21fc19233
Add regression tests for inverse_transpose
2024-12-28 10:29:44 +01:00
Sebastian Pahnke
ec5ee19c01
Add regression tests for matrix inverse
2024-12-28 10:29:44 +01:00
Sebastian Pahnke
02a9d8560f
Test symmetry
2024-12-28 10:29:44 +01:00
Sebastian Pahnke
0d955e55db
Add tests for determinants because their calculation depends on the adjugate
2024-12-28 10:29:43 +01:00
Sebastian Pahnke
e8a202f0a2
Add tests for glsl and hlsl variants
2024-12-28 10:29:43 +01:00
Sebastian Pahnke
8a91e0bb19
Add regression tests reproducing the issue
2024-12-28 10:29:43 +01:00
Karl Zylinski
e5f32e1455
Makes tracking allocator default to crashing on a bad free instead of add to 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.
2024-12-21 15:49:48 +01:00
Gavin
25ae3d0785
Add regression test for #4553
...
This test is definitely imperfect (should have no erroneous failures,
only erroneous passes), but should serve as a good smoke test
if matrix alignment is ever broken again. Looking at the generated LLVM,
there is a bunch of weird choices for alignment chosen that might be
worth looking into.
It's also worth noting that the failure mode of this test is a #GP
exception, which I don't know how well the test runner handles in a
larger test corpus.
2024-12-05 15:26:18 -05:00
Adam Zadrożny
ce51b79a37
Fix the unused variable errors
2024-12-04 21:09:47 +01:00
Adam Zadrożny
5dfc24882f
improve strings.index_multi
...
There's no point searching for substrings after lowest_index,
so let's not.
This significantly improves performance on long strings.
2024-12-04 14:29:49 +01:00
Ycros
bf63e9b093
Add test for regex preallocated captures.
2024-12-04 14:38:07 +11:00
Damian Tarnawski
26415bcb0e
Correct handling newlines between build tags in core:odin
...
Previously I thought that each newline worked as `OR`
basically the same as `,`.
This corrects this to work as `AND` instead.
2024-12-01 18:21:26 +01:00
Jeroen van Rijn
1a0a6c485d
Add comment explaining #4515 test.
2024-11-25 13:47:04 +01:00
Jeroen van Rijn
2dc0187836
Test #4515
2024-11-25 13:16:27 +01:00
Colin Davidson
f8586d0051
oops, copy-paste-bug
2024-11-20 15:33:20 -08:00
Colin Davidson
3bb73eacfc
fix parsing issue around utc/localtime split
2024-11-20 12:09:32 -08:00
Tetralux
2f85257bad
[runtime] make(map[K]V) should not allocate any capacity
...
`make(map[K]V)` was resolving to `make_map_cap()` which allocates initial capacity when it wasn't intended to.
It now calls `make_map()` which doesn't allocate any capacity.
Both `make(map[K]V)` and `make(map[K]V, allocator)` will NOT allocate initial capacity now.
2024-11-16 06:13:12 +00:00
Laytan Laats
282d956aa7
os2: skip dir test when unsupported
2024-11-15 21:56:55 +01:00
Laytan Laats
71020d7642
os2: add read dir test
2024-11-15 20:47:51 +01:00
Colin Davidson
c9158b3220
add new test, better fail-check, and non-transitioning tz fix
2024-11-05 03:44:07 -08:00
Laytan Laats
cc3c9bd871
fix thread_unix for Darwin after pthread corrections in posix package
...
afed3ce removed the sys/unix package and moved over to sys/posix, it has
new bindings for the pthread APIs but should have been equivalent (not).
8fb7182 used `CANCEL_ENABLE :: 0`, `CANCEL_DISABLE :: 1`, `CANCEL_DEFERRED :: 0`, `CANCEL_ASYNCHRONOUS :: 1` for Darwin, while the
correct values are `1`, `0`, `2` and `0` respectively (same mistake was made for
FreeBSD in that commit).
What this meant is that the
`pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS)` was not actually
successful, but because the error wasn't checked it was assumed it was.
It also meant `pthread_setcancelstate(PTHREAD_CANCEL_ENABLE)` would
actually be setting `PTHREAD_CANCEL_DISABLE`.
The code in this PR restores the behaviour by now actually deliberately
setting `PTHREAD_CANCEL_DISABLE` and not setting
`PTHREAD_CANCEL_ASYNCHRONOUS` which was the previous behaviour that does
actually seem to work for some reason.
(I also fixed an issue in fmt where `x` would use uppercase if it was a
pointer.)
2024-10-30 15:51:56 +01:00
gingerBill
ee76acd665
Merge pull request #4427 from laytan/posix-additions
...
Finish sys/posix with Linux and partial Windows support & clean up other packages as a result
2024-10-30 11:43:47 +00:00
Laytan
7e12e37df9
fix test
2024-10-28 19:58:39 +01:00
Laytan Laats
1cebc025b0
sys/posix: impl rest of linux, impl some of Windows
2024-10-28 18:59:06 +01:00
Laytan Laats
4608d26e6e
encoding/cbor: fix skipping of ignored/missing fields in struct unmarshal
2024-10-26 22:39:46 +02:00
Laytan Laats
793ef6012b
encoding/cbor: handle binary having more fields than the struct by discarding
2024-10-25 20:37:55 +02:00
Jeroen van Rijn
00ec862b63
Merge pull request #4335 from colrdavidson/datetime_tz
...
Add Timezone Support to Odin
2024-10-22 10:18:38 +02:00
Laytan Laats
b746e5287e
build tracking allocator code on freestanding wasm
2024-10-14 16:06:16 +02:00
Colin Davidson
4c8e355444
tweaks per laytan suggestions
2024-10-10 09:14:29 -07:00
Colin Davidson
a6502c3e8c
Initial cut of timezones
2024-10-09 19:26:43 -07:00