Commit Graph

545 Commits

Author SHA1 Message Date
Laytan 1ab0745ca8 Merge pull request #4212 from karl-zylinski/fix-build-tags
Fix build tags that use ! multiple times on one line.
2024-09-07 22:18:29 +02:00
Karl Zylinski 8c636ac37b Fix build tags that use ! multiple times on one line. Those don't actually do anything since build tags use OR within the line. So something like //+build !windows, !linux would actually build on both linux and windows. What was intended in all these cases was probably AND, which you get by splitting them into separate lines. 2024-09-07 22:02:17 +02:00
Jeroen van Rijn c4c2282595 Update 4210 test to use unaligned_load. 2024-09-07 14:05:56 +02:00
Jeroen van Rijn d2202416d2 Add test for #4210 2024-09-07 13:43:19 +02:00
laytan a99e57c62c bytes: fix last_index_byte off-by-one 2024-09-05 13:30:46 +02:00
Jeroen van Rijn c6b551d2c3 Merge pull request #4194 from Feoramund/update-bit-array
Update `bit_array`
2024-09-03 23:42:27 +02:00
Feoramund 2f1228baa0 Add tests for Bit_Array 2024-09-03 17:23:42 -04:00
Jeroen van Rijn 645207b8b0 Merge pull request #4192 from laytan/strings-substring-rune-wise
strings: add `substring`, `substring_to` and `substring_from`
2024-09-03 22:47:56 +02:00
Laytan Laats 597ba796b7 strings: add substring, substring_to and substring_from 2024-09-03 21:13:35 +02:00
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