Commit Graph

108 Commits

Author SHA1 Message Date
Jeroen van Rijn
ab98108441 [image/png] Construct test paths differently. 2022-06-11 16:07:56 +02:00
gingerBill
bc18310107 Correct xml test 2022-05-12 16:01:15 +01:00
zhibog
0e91e63043 Fix issue 1761. Added the test vector to the core and vendor tests 2022-05-04 22:13:50 +02:00
Jeroen van Rijn
b99940f33a [xxhash] For the streaming tests, randomly select the size to use.
Randomize size used with `update`.

It'll print "Using user-selected seed {18109872483301276539,2000259725719371} for update size randomness."

If a streaming test then fails, you can repeat it using:
`odin run . -define:RAND_STATE=18109872483301276539 -define:RAND_INC=2000259725719371`
2022-05-02 19:20:25 +02:00
Jeroen van Rijn
6985181961 [xxhash] Add tests for large inputs
Test XXH32, XXH64, XXH3-64 and XXH3-128 for large inputs, with both all-at-once and streaming APIs.

XXH32_create_state and XXH64_create_state now implicitly call their "reset state" variants to simplify the streaming API to 3 steps:
- create state / defer destroy
- update
- digest (finalize)

These are tested with an array of 1, 2, 4, 8 and 16 megabytes worth of zeroes.
All return the same hashes as do both the one-shot version, as well as that of the official xxhsum tool.

3778/3778 tests successful.
2022-05-02 17:51:39 +02:00
Jeroen van Rijn
2081f8fcd6 [tests/core/image] Remove old crappy PPM writer. 2022-04-30 22:04:47 +02:00
Jeroen van Rijn
7a032cf9f9 [pbm] Also test PFM formats. 2022-04-30 21:57:14 +02:00
Jeroen van Rijn
694c13fe86 Merge branch 'master' into pr/1726 2022-04-30 21:01:04 +02:00
Jeroen van Rijn
8bd16c32f3 [pbm] Fixes. 2022-04-30 21:00:32 +02:00
Jeroen van Rijn
234d529867 [pbm] WIP unit tests. part deux. 2022-04-30 19:25:16 +02:00
Jeroen van Rijn
dd8b71e353 [pbm] WIP unit tests. 2022-04-30 17:52:23 +02:00
Jeroen van Rijn
3978e7e1ca [xml] Add parse_from_string overload.
`parse` now takes either a `[]u8` slice or a string.
`load_from_file` takes a path string.
2022-04-30 14:43:58 +02:00
Jeroen van Rijn
d6a8216ce4 [pbm] Normalize some errors, correct .depth 2022-04-30 14:34:07 +02:00
Jeroen van Rijn
9c9c2b483c [i18n] Enable *nix tests again. 2022-04-29 18:41:21 +02:00
Jeroen van Rijn
819345caa6 Disable i18n test for *nix for now. 2022-04-29 18:28:42 +02:00
Jeroen van Rijn
36263399a0 [i18n] Enable i18n test on Linux. 2022-04-29 18:13:46 +02:00
Jeroen van Rijn
ff0f0c447f [i18n] Fix segfault on destroy on Linux
Forgot to intern the section string in QT TS loader.
2022-04-29 18:10:13 +02:00
Jeroen van Rijn
09e1c0fa27 [i18n] Add tests. 2022-04-29 16:19:13 +02:00
Jeroen van Rijn
957ef8e8fe [i18n/xml] Move I18N XML files to their own assets directory. 2022-04-29 13:16:30 +02:00
Jeroen van Rijn
1289c96e2c [i18n] QT Linguist TS reader. 2022-04-29 00:29:55 +02:00
Jeroen van Rijn
127b0ba65e [xml] Enable tests. 2022-04-28 15:46:36 +02:00
Jeroen van Rijn
80878264b6 [xml] Speedup. 2022-04-28 15:29:00 +02:00
Jeroen van Rijn
6df21d6a9f Merge branch 'master' into xml 2022-04-27 16:13:47 +02:00
Jeroen van Rijn
da0f722aad Move Odin CI test assets over to its own repository. 2022-04-27 15:56:45 +02:00
Jeroen van Rijn
c4e0d1efa1 Merge branch 'master' into xml 2022-04-27 14:37:15 +02:00
Jeroen van Rijn
40f0f5ad8d Update CI for math library. 2022-04-26 15:01:09 +02:00
Jeroen van Rijn
5e11ad2e1e Update test paths. 2022-04-26 14:23:23 +02:00
Jeroen van Rijn
a5342a0126 Address edge cases. 2022-04-26 13:14:09 +02:00
Jeroen van Rijn
3d2856db31 Update tests to use new filename generation code. 2022-04-24 14:19:25 +02:00
Jeroen van Rijn
3cab2592c3 Compiler: Add early error for output path being a directory.
- Introduce new `Path` type and an array of build paths on the build context.
- Resolve input and output paths/files early (before parsing).
- Error early if inputs are missing or outputs are directories.
- Plumb new file path generation into linker stage instead of its adhoc method.

TODO:
- Remove more adhoc file path generation in parser and linker stage.
- Make intermediate object file generation use new path system.
- Round out and robustify Path helper functions.
2022-04-24 13:37:26 +02:00
Jeroen van Rijn
e799476f90 [compress/shoco] Add short string compressor. 2022-04-22 16:55:47 +02:00
Jeroen van Rijn
a30b9b17b3 [json/unmarshal] Fix quoted strings. 2022-04-19 20:32:22 +02:00
Jeroen van Rijn
323e7a2d02 Add JSON unmarshal test. 2022-04-19 15:03:09 +02:00
Jeroen van Rijn
df4a0c62ad Delete accidentally added test artefact. 2022-04-18 19:10:53 +02:00
Jeroen van Rijn
44316401c9 Add uleb128 byte-at-a-time decoder. 2022-04-16 02:07:57 +02:00
Jeroen van Rijn
bf712e9355 [QOI] Add support for RGB images (previously loader always output RGBA).
Also add QOI to CI test suite by roundtripping 8-bit RGB(A) through QOI and checking the hashes match.
2022-04-12 19:23:48 +02:00
Jeroen van Rijn
15b440c4f1 [image] Add QOI load/save.
Additionally:
- Firm up PNG loader with some additional checks.
- Add helper functions to `core:image` to expand grayscale to RGB(A), and so on.

TODO: Possibly replace PNG's post-processing steps with calls to the new helper functions.
2022-04-12 18:14:09 +02:00
Jeroen van Rijn
bb9165edd2 Add -help to CI tests. 2022-04-05 20:45:00 +02:00
Jeroen van Rijn
581d53b96b [math/big] Tell Python test runner how many nails we use.
`_DIGIT_NAILS` is defined as 4, meaning that we use 60 out of every 64 bits.
We can use as few as 1 nail, using 63 bits out of every 64, and all tests will still pass.

However, it needs more testing to see if that's a worthwhile change to make.

For the tests to work properly when changing the nails, Python needs to know about it as well.

In addition, compile the big math code with `-o:speed` going forward.
2022-04-01 16:24:27 +02:00
Jeroen van Rijn
df32b5b46c [windows] Fix leak in glob. 2022-03-29 16:13:17 +02:00
Jeroen van Rijn
24c48d22bc [strings] Improve cut, add tests for it. 2022-03-27 22:13:26 +02:00
gitlost
8661457512 Use WIFEXITED() and WEXITSTATUS() on Unix system() exit code
(ensures Odin run returns correct exit code of built executable)
Adds test "tests/core/os/test_core_os_exit.odin" (Unix only)
2022-03-24 19:31:46 +00:00
gingerBill
7203560b06 Fix test 2022-03-24 12:15:03 +00:00
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
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