aboutsummaryrefslogtreecommitdiff
path: root/tests/core/encoding
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2025-06-04 22:00:02 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2025-06-04 22:00:02 +0200
commit9eefa2006eccdf942c01fc1421784edea78c5591 (patch)
tree7753b36a7f93f66afe1bd14780af39ca59d2c533 /tests/core/encoding
parent85224b21e69678923b5a514586d50730b8d823a3 (diff)
encoding/cbor: support simd vectors
Diffstat (limited to 'tests/core/encoding')
-rw-r--r--tests/core/encoding/cbor/test_core_cbor.odin8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/core/encoding/cbor/test_core_cbor.odin b/tests/core/encoding/cbor/test_core_cbor.odin
index a76d690be..7bea69d2e 100644
--- a/tests/core/encoding/cbor/test_core_cbor.odin
+++ b/tests/core/encoding/cbor/test_core_cbor.odin
@@ -44,6 +44,7 @@ Foo :: struct {
smallest: big.Int,
ignore_this: ^Foo `cbor:"-"`,
mat: matrix[4, 4]f32,
+ vec: #simd [4]f64,
}
FooBar :: enum {
@@ -97,6 +98,7 @@ test_marshalling :: proc(t: ^testing.T) {
small_onetwenty = -i128(max(u64)),
ignore_this = &Foo{},
mat = 1,
+ vec = 2,
}
big.atoi(&f.biggest, "1234567891011121314151617181920")
@@ -145,6 +147,12 @@ test_marshalling :: proc(t: ^testing.T) {
"now": 1(1701117968),
"pos": 1212,
"str": "Hellope",
+ "vec": [
+ 2.0000,
+ 2.0000,
+ 2.0000,
+ 2.0000
+ ],
"yes": true,
"comp": [
32.0000,