gitlost
374e71e9b0
Fix issue #1537 "filepath.split_list requires a trailing separator"
...
Does `make()` with `count + 1` and appends final component (note a
trailing separator will now result in an empty final component)
Adds test "tests/core/path/filepath/test_core_filepath.odin"
2022-03-23 17:44:35 +00:00
gitlost
10c5825715
Fix issue #829 "Compiler crashes when declaring maps with procedure"
...
Inits `o->value` in `check_expr_base_internal()` so doesn't accidentally
use last (the proc lit was being set to that of previous string)
Adds test to "tests/issues" and changes CI to use new "run" shells
2022-03-23 12:56:37 +00:00
gingerBill
0446d9721b
Merge pull request #1626 from gitlost/hxa_fixes
...
Fix some core:encoding/hxa stuff (error handling, header, max -> min)
2022-03-22 15:21:40 +00:00
gitlost
fdbbf24271
Fix issue #1592 "LLVM code gen error when using a constant in an if"
...
Changes lb_build_if_stmt() to return null lbValue if condition is
cmpAnd, cmpOr or non-const neg and check in lb_build_if_stmt()
to avoid short circuiting if that's the case
Adds test to "tests/issues" and adds step in CI to check this dir
2022-03-18 13:57:22 +00:00
gitlost
4f5203e661
Fix some core:encoding/hxa stuff (error handling, header, max -> min)
...
Also add missing f16 case to core:reflect as_u64 & as_f64
Add tests for above & add previous tests missing from test/core/build.bat
2022-03-16 19:12:00 +00:00
Jeroen van Rijn
ef3f448861
Remove accidentally committed test binary.
2022-03-14 13:06:50 +01:00
gitlost
7dbcaf792d
Merge branch 'master' into fract_trunc_classify_#1574
...
Resolve conflicts with [9848e88 ] & sameify Makefile & tests/common/common.odin
2022-03-09 16:09:04 +00:00
Jeroen van Rijn
52e60526ef
tabs.
2022-03-08 19:32:30 +01:00
Jeroen van Rijn
76b10b5f5d
[varint] Add additional LEB128 tests.
2022-03-08 19:28:55 +01:00
gitlost
b94a7a87fa
Fix issue #1574 "fract in linalg/glm is broken" by fixing
...
trunc_f16/32/64 in "math.odin" (~ typos on expressions)
Fix classify_f16 Inf test (would fail for subnormal 0h0001)
by changing multiplier 0.5 -> 0.25
Add some useful consts to "math.odin" (INF_F16 etc)
Add comment to "demo.odin" mentioning that -0.0 must be used
to specify negative zero
2022-03-08 18:06:25 +00:00
Jeroen van Rijn
e76a5d8e12
[varint] Add signed LEB128 encoding.
2022-03-08 18:07:16 +01:00
Jeroen van Rijn
6d7217f37a
[varint] Add LEB128 decoding + tests
...
Also make tests in general less spammy: Don't print [PASS] for each successful test, only report failures and progress.
2022-03-08 15:40:00 +01:00
Jeroen van Rijn
6d9f84ba03
[tests] Make test runners exit with errorlevel 1 if a test fails.
2022-03-03 15:16:16 +01:00
Sébastien Marie
57862846a2
tests/vendor: pass extra linker flags
...
on OpenBSD, botan library is third-party and live in /usr/local which isn't a path included by default in linker.
2022-02-26 08:21:46 +00:00
zhibog
e7be9493ba
Added SipHash + tests and fixed remaining semicolons in vendor/botan
2022-02-22 19:56:07 +01:00
gingerBill
f5697dd7f2
Merge branch 'master' into odin-global-constants-as-enums
2022-02-15 15:47:24 +00:00
NoahR02
accb35506f
Ports OpenSimplex2 from https://github.com/KdotJPG/OpenSimplex2 to Odin. Adds tests for the noise procedures.
2022-02-08 06:25:07 -05:00
NoahR02
817bc7434d
Ports OpenSimplex2 from https://github.com/KdotJPG/OpenSimplex2 to Odin. Adds tests for the noise procedures.
2022-02-08 06:16:10 -05:00
gingerBill
6223f48c3f
Update tests
2022-01-20 20:08:24 +00:00
gingerBill
2a325b3da0
Update ODIN_ENDIAN usage
2022-01-16 12:25:39 +00:00
Jeroen van Rijn
938744b276
[math/big] Rename internal_int_shl_digit to _private_int_shl_leg.
...
Same for the SHR variant. These are pure implementation details to shift by a leg/word at a time.
Prevent accidental usage.
2021-12-11 15:22:24 +01:00
Jeroen van Rijn
c94098c2ab
[math/big] Fix int_set and int_get.
2021-12-09 16:14:04 +01:00
Yawning Angel
6bafa21bee
crypto: Add rand_bytes
...
This adds `rand_bytes(dst: []byte)` which fills the destination buffer
with entropy from the cryptographic random number generator. This takes
the "simple is best" approach and just directly returns the OS CSPRNG
output instead of doing anything fancy (a la OpenBSD's arc4random).
2021-11-17 14:00:00 +00:00
Yawning Angel
6c4c9aef61
core/crypto: Add chacha20poly1305
...
This package implements the chacha20poly1305 AEAD construct as specified
in RFC 8439.
2021-11-17 13:59:53 +00:00
Yawning Angel
7bed317636
core/crypto: Add chacha20
...
This package implements the ChaCha20 stream cipher as specified in
RFC 8439, and the somewhat non-standard XChaCha20 variant that supports
a 192-bit nonce.
While an IETF draft for XChaCha20 standardization exists,
implementations that pre-date the draft use a 64-bit counter, instead of
the IETF-style 32-bit one. This implementation opts for the latter as
compatibility with libsodium is more important than compatibility with
an expired IETF draft.
2021-11-17 13:59:53 +00:00
Yawning Angel
64db286582
core/crypto: Add poly1305
...
This package implements the Poly1305 MAC algorithm as specified in RFC
8439, using routines taked from fiat-crypto and poly1305-donna.
2021-11-17 13:59:53 +00:00
Yawning Angel
1a7a6a9116
core/crypto: Add x25519
...
This package implements the X25519 key agreement scheme as specified in
RFC 7748, using routines taken from fiat-crypto and Monocypher.
2021-11-17 13:59:53 +00:00
Jeroen van Rijn
c213274607
[vendor:glfw] Add test.
2021-11-10 19:15:10 +01:00
zhibog
8aadcacc0b
Add tests to Linux and Mac and add vendor tests
2021-11-10 15:22:12 +01:00
zhibog
cef9632607
Add Botan crypto lib as a vendor library
2021-11-09 23:49:17 +01:00
zhibog
c24454ae70
Removed context switching system from the crypto library to simplify the code
2021-11-09 16:50:13 +01:00
Daniel Gavin
5b074ceee5
Add json encoding test + fix enum not being set on success.
2021-11-07 14:35:52 +01:00
zhibog
8876328e4d
Move botan.dll to correct directory
2021-10-14 23:03:55 +02:00
zhibog
f4ff11a7ff
Added botan.dll for tests
2021-10-14 22:58:20 +02:00
zhibog
77be7144c3
Add crypto library. Additional information is included in the README.md
2021-10-14 22:20:55 +02:00
Jeroen van Rijn
c4b4a841d6
png: Move metadata.
2021-10-06 22:43:33 +02:00
Jeroen van Rijn
8fcd1794a6
png: Add sane compile-time maximums for dimensions + chunk sizes.
2021-10-06 21:48:22 +02:00
Jeroen van Rijn
9b5ae95677
png + compress: Rearrange error unions.
2021-10-06 20:45:29 +02:00
Jeroen van Rijn
21c6d691d8
Add additional error checking to helpers.
2021-10-06 20:10:37 +02:00
gingerBill
1e7c60e171
Minor style change
2021-10-02 14:05:26 +01:00
Jeroen van Rijn
6e22a6dfa5
hash: Smaller CRC-64 ISO 3306 table.
2021-09-21 16:28:35 +02:00
Jeroen van Rijn
181eabcffc
hash: Add CRC-64 (ISO 3306) and inverse.
2021-09-21 16:17:01 +02:00
Jeroen van Rijn
b600ffba3b
Correct CRC-64 (ECMA 182) & add CRC-64 (XZ) and tests.
2021-09-21 15:17:23 +02:00
Daniel Gavin
46d99395ce
typo in filename
2021-09-20 20:53:39 +02:00
Daniel Gavin
50ee65ea9e
Make default_parser use the optional_semicolons and add odin parser test.
2021-09-20 20:50:01 +02:00
Jeroen van Rijn
b6d0a8fe0c
xxhash: Add tests for streaming input.
2021-09-15 23:32:48 +02:00
Jeroen van Rijn
a641ef95c0
Add XXH3-64 + tests.
2021-09-13 20:58:26 +02:00
Jeroen van Rijn
ada3be05fb
xxhash: typo.
2021-09-12 12:14:49 +02:00
Jeroen van Rijn
36a2cf0369
xxhash: Add custom secret tests.
2021-09-12 12:11:39 +02:00
Jeroen van Rijn
00c1d34108
xxhash: Extra (generated) tests.
2021-09-11 23:45:08 +02:00