From 9eefa2006eccdf942c01fc1421784edea78c5591 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Wed, 4 Jun 2025 22:00:02 +0200 Subject: encoding/cbor: support simd vectors --- tests/core/encoding/cbor/test_core_cbor.odin | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/core/encoding') 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, -- cgit v1.2.3