From 044ab1fe5ca84d2396ec62f185e0b0ced555157f Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Mon, 2 Feb 2026 16:48:24 +0800 Subject: [PATCH] adds more tests --- tests/align/talign.nim | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/tests/align/talign.nim b/tests/align/talign.nim index 9ac7c8d544..6397e31214 100644 --- a/tests/align/talign.nim +++ b/tests/align/talign.nim @@ -111,3 +111,61 @@ for q in 0..500: y[i].a = q doAssert(cast[int](y[i]) mod alignof(MyType32) == 0) +# Additional tests: allocate custom aligned objects using `new` +type + MyType64 = object + a{.align(64).}: int + +var z: array[10, ref MyType64] +for q in 0..500: + for i in 0..