From c9b3a999bd003b6489c5679c91c06ec48258e648 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 4 Oct 2021 20:10:21 +0200 Subject: Finished implementing the stackstack --- tests/stack.nim | 2 ++ tests/stackStack.nim | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/stack.nim b/tests/stack.nim index cb49daf..cecdef9 100644 --- a/tests/stack.nim +++ b/tests/stack.nim @@ -110,6 +110,8 @@ suite "Stack": check empty.data[1] == 0 check empty.data[2] == 0 check empty.data[3] == 0 + empty[].Transfert(empty2[], 32) + check empty.size == 64 empty = NewStack() var some = NewStack() some[].Push(2) diff --git a/tests/stackStack.nim b/tests/stackStack.nim index 03650f8..9f3c176 100644 --- a/tests/stackStack.nim +++ b/tests/stackStack.nim @@ -22,6 +22,14 @@ suite "StackStack": empty[].Push(3) empty[].Clear() check empty[].Pop() == 0 + test "Duplicate": + var empty = NewStackStack() + empty[].Clear() + check empty[].Pop() == 0 + test "Swap": + var empty = NewStackStack() + empty[].Swap() + check empty[].Pop() == 0 test "Begin": var empty = NewStackStack() empty[].Begin((1, 2)) -- cgit v1.2.3