Commit Graph

463 Commits

Author SHA1 Message Date
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
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
gingerBill
97c499dbb4 Begin mapping os.Error in the rest of the codebase 2024-08-04 11:58:04 +01:00
Laytan Laats
99d9e8f8b1 fix os.read_dir with symlinks 2024-08-03 00:26:46 +02:00
Laytan Laats
4d1d754cae fix specific_union_variant in map_keyed_by_union not converting to union type 2024-07-29 02:32:13 +02:00
Thomas la Cour
271ec643ed removed some comments 2024-07-26 11:30:48 +02:00
Thomas la Cour
fe587ee79a try to add sys/windows to the normal core tests 2024-07-26 11:04:13 +02:00
Thomas la Cour
b149b3d6c6 Merge remote-tracking branch 'upstream/master' into sys-windows-2 2024-07-26 10:45:09 +02:00
Thomas la Cour
03f3ea5a9e removed old test stuff 2024-07-26 10:43:26 +02:00
Jeroen van Rijn
9088a493d9 Add time.to_string* formatters. 2024-07-25 19:43:42 +02:00
Thomas la Cour
9d67d12d22 Merge remote-tracking branch 'upstream/master' into sys-windows-2
# Conflicts:
#	core/sys/windows/shell32.odin
2024-07-25 10:05:41 +02:00
Jeroen van Rijn
33d6677514 Merge pull request #3951 from Kelimion/lua_test
Add Lua example to `vendor:lua` as well as basic tests.
2024-07-24 17:50:49 +02:00
Laytan Laats
a055c03de9 use #directory in lua test 2024-07-22 01:11:01 +02:00
Jeroen van Rijn
fc5ce30f34 Allow json to unmarshal empty struct. 2024-07-21 00:37:11 +02:00
Jeroen van Rijn
f78a792d48 Add Lua example to vendor\lua as well as basic tests. 2024-07-20 18:30:41 +02:00
Ronald
e0a8bd04d5 Ensure deletion of maybe is delayed until we're finished with it. 2024-07-20 17:10:34 +01:00
Ronald
f560b14d10 Fix typo in name of test 2024-07-20 17:10:19 +01:00
Ronald
b584eeaade Add encoding/ini tests 2024-07-20 16:53:54 +01:00
Jeroen van Rijn
0a9c150748 Merge pull request #3929 from laytan/fix-fmt-len-transfer-to-children
fmt: fix optional_len or use_nul_termination being used by both array and elems
2024-07-15 19:36:20 +02:00
Laytan Laats
f362e0fa20 add test for leaking struct tag into elems 2024-07-15 19:27:48 +02:00
Yawning Angel
69026852ce core/crypto/aes: Add Intel AES-NI support
This supports AES-NI + PCLMUL, and provides optimized key schedule, ECB,
CTR, and GCM.  Other modes are trivial to add later if required.
2024-07-16 01:29:43 +09:00
Yawning Angel
401877184f tests/benchmark/crypto: Benchmark AES256-CTR 2024-07-16 01:29:43 +09:00
Yawning Angel
4815154c31 test/core/crypto: Fix a copy-paste issue in failure spew 2024-07-16 01:29:43 +09:00
Yawning Angel
0d8dadec8a tests/core/crypto: Fix new -vet issues 2024-07-16 01:29:43 +09:00
VladPavliuk
3f8712edb0 Merge branch 'master' into json-add-int-key-map-support 2024-07-14 18:22:20 +03:00
gingerBill
8642d719f0 Imply #no_capture to all variadic parameters 2024-07-14 12:19:47 +01:00
gingerBill
c7bd954752 Add more uses of #no_capture 2024-07-14 11:56:04 +01:00
VladPavliuk
76fe5d1346 Align ignore syntax of json tags with fmt, cbor 2024-07-14 00:21:05 +03:00
VladPavliuk
64ae99f016 Add support of ignore tag for json.marshal 2024-07-13 14:13:59 +03:00
VladPavliuk
79e2f63182 Small code refactoring in test_core_json 2024-07-13 00:38:58 +03:00
VladPavliuk
39983eaaa4 Remove unused imports in test_core_json 2024-07-13 00:26:54 +03:00
VladPavliuk
dbdad0476d Allow to marshal and unmarshal maps with int keys 2024-07-13 00:07:48 +03:00
Thomas la Cour
dd75b7a4d9 Merge remote-tracking branch 'upstream/master' into sys-windows-2
# Conflicts:
#	core/sys/windows/kernel32.odin
#	core/sys/windows/types.odin
#	core/sys/windows/user32.odin
#	core/sys/windows/winerror.odin
2024-07-11 21:20:53 +02:00
DerTee
a76f9a70d5 add test for allocator mem.Dynamic_Pool
this test currently fails because of bug #3692
2024-07-03 22:13:20 +02:00
Feoramund
8e64265aed Replace unneeded transmute 2024-06-30 16:39:22 -04:00
Feoramund
1e7dfd0e34 Add more core:net tests
- UDP send & read
- DNS resolution
- Nonblocking socket option
2024-06-30 16:39:22 -04:00
gingerBill
b0cbda4ee0 Fix indentation of tests 2024-06-29 18:51:28 +01:00
gingerBill
4824050c99 Merge pull request #3792 from Feoramund/core-uuid
Add `core:encoding/uuid`
2024-06-28 09:49:23 +01:00
Jeroen van Rijn
c33bf7673f Fix core:math/fixed. 2024-06-26 20:12:55 +02:00
Feoramund
ba05c74936 Enable core:net tests for FreeBSD 2024-06-26 10:05:24 -04:00