Jeroen van Rijn
9d0f4833bf
Port tests\core\encoding\xml
...
Made them run in parallel as well.
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
6641a6f6c9
Port tests\core\encoding\varint
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
601df0e8f7
Port tests\core\encoding\json
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
1b32e27aa4
Port tests\core\encoding\hxa
...
And fix a few leaks in `core:encoding/hxa` while at it.
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
3404dea8ac
Port tests\encoding\hex
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
a27b167218
Update tests\core\encoding\cbor to use new test runner.
...
It was leaky and required a substantial number of `loc := #caller_location` additions to parts of the core library to make it easier to track down how and where it leaked.
The tests now run fine multi-threaded.
2024-06-02 14:47:07 -04:00
Laytan Laats
04bd3cc525
encoding/cbor: rename diagnose to to_diagnostic_format to be clearer
2024-03-04 17:26:19 +01:00
Laytan
b11d839fb6
encoding/cbor: make temp allocations more explicit
2024-03-04 17:26:19 +01:00
Laytan
0076c07076
encoding/cbor: core -> base
2024-03-04 17:26:19 +01:00
Laytan Laats
c4e45d509a
encoding/cbor: adhere to new quaternion rules of master
2024-03-04 17:26:19 +01:00
Laytan Laats
317931a3c5
encoding/cbor: deterministically store bit sets as big endian
2024-03-04 17:26:19 +01:00
Laytan Laats
759d095548
encoding/cbor: ignore struct fields with cbor:"-"
2024-03-04 17:26:19 +01:00
Laytan Laats
7854aa22d9
encoding/cbor: fix unused import
2024-03-04 17:26:19 +01:00
Laytan Laats
72d5b87b52
encoding/cbor: clean
2024-03-04 17:26:19 +01:00
Laytan Laats
21e6e28a3a
encoding/cbor: add decoder flags and protect from malicious untrusted input
2024-03-04 17:26:19 +01:00
Laytan Laats
d77ae9abab
encoding/cbor: fully support marshal/unmarshal of unions
2024-03-04 17:26:19 +01:00
Laytan Laats
b6c47e7963
encoding/base64: add decode_into, add tests
2024-03-04 17:26:17 +01:00
Laytan Laats
5533a327eb
encoding/cbor: initial package implementation
2024-03-04 17:25:34 +01:00
Laytan Laats
606f11ebe8
fix hxa test use after free, skip weird pow test failure
2024-02-02 21:10:11 +01:00
Jeroen van Rijn
4efef08c94
Update core:encoding to Unicode 15.1 table.
2024-01-02 18:03:32 +01:00
Rickard Andersson
2e3224a138
testing: add test for Out_Of_Memory return
2023-10-02 15:17:06 +03:00
Abdelrahman Farid
9ed36445b9
Add test for utf8 multibyte strings
2023-09-19 22:18:23 +03:00
gingerBill
5dba08fb3b
Keep -vet happy
2023-07-31 12:19:25 +01:00
gingerBill
8aa36072fc
Remove using where easily possible
2023-07-31 12:11:17 +01:00
Jeroen van Rijn
683ee75703
Fix #2684
2023-07-28 15:53:39 +02:00
Laytan Laats
5d54b710e7
fix #2550 json encoding should use surrogate pairs per RFC7159
2023-05-22 17:22:33 +02:00
Laytan Laats
2ab6de8ee4
fix hex.encode and add tests for the package
2023-05-15 20:52:07 +02:00
gingerBill
ae9d540c1c
Correct naming in tests
2022-07-11 11:55:49 +01:00
gingerBill
bc18310107
Correct xml test
2022-05-12 16:01:15 +01: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
957ef8e8fe
[i18n/xml] Move I18N XML files to their own assets directory.
2022-04-29 13:16:30 +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
c4e0d1efa1
Merge branch 'master' into xml
2022-04-27 14:37:15 +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
gingerBill
7203560b06
Fix test
2022-03-24 12:15:03 +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
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
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
Jeroen van Rijn
7ec88d2430
[xml] Add option.
2021-12-05 21:06:33 +01:00
Jeroen van Rijn
d7200f6144
Improve tests in general.
...
Less spammy core tests: They don't print PASSes now, only logs and failures.
`core:image` and `core:encoding/xml` tests also find their assets relative to `ODIN_ROOT` now.
2021-12-05 02:53:09 +01:00
Jeroen van Rijn
d65d6edb0e
[xml] Improve XML tests, test core:encoding/entity.
2021-12-05 02:52:23 +01:00
Jeroen van Rijn
5807214406
[xml] Improvements.
2021-12-05 02:52:23 +01:00
Jeroen van Rijn
b5c828fe4e
[xml] Initial implementation of core:encoding/xml.
...
A from-scratch XML implementation, loosely modeled on the [spec](https://www.w3.org/TR/2006/REC-xml11-20060816 ).
Features:
- Supports enough of the XML 1.0/1.1 spec to handle the 99.9% of XML documents in common current usage.
- Simple to understand and use. Small.
Caveats:
- We do NOT support HTML in this package, as that may or may not be valid XML.
If it works, great. If it doesn't, that's not considered a bug.
- We do NOT support UTF-16. If you have a UTF-16 XML file, please convert it to UTF-8 first. Also, our condolences.
- <[!ELEMENT and <[!ATTLIST are not supported, and will be either ignored or return an error depending on the parser options.
TODO:
- Optional CDATA unboxing.
- Optional `>`, ` `, ` ` and other escape substitution in tag bodies.
- Test suite
MAYBE:
- XML writer?
- Serialize/deserialize Odin types?
2021-12-05 02:52:22 +01:00