From 98fe41748865e2b22b115627ef3297a671f3100d Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 11 Nov 2021 21:49:53 +0100 Subject: Fixed stack transfert sizing bug --- tests/stack.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/stack.nim b/tests/stack.nim index ebbbe5d..bf02299 100644 --- a/tests/stack.nim +++ b/tests/stack.nim @@ -101,8 +101,8 @@ suite "Stack": check some.data[2] == -4 check some.data[3] == 0 test "Transfert": - var empty = NewStack() - var empty2 = NewStack() + var empty = NewStack(size=12) + var empty2 = NewStack(size=7) empty[].Transfert(empty2[], 4) check empty.height == 4 check empty2.height == 0 @@ -111,7 +111,7 @@ suite "Stack": check empty.data[2] == 0 check empty.data[3] == 0 empty[].Transfert(empty2[], 32) - check empty.size == 64 + check empty.size == 36 empty = NewStack() var some = NewStack() some[].Push(2) -- cgit v1.2.3