diff options
author | Julien Dessaux | 2021-10-04 18:22:59 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-10-04 18:22:59 +0200 |
commit | 1d11df68fc011a023e19b4ec7db4df73bef331d7 (patch) | |
tree | 0a86ae37833929ad9972dbc5779fca0e59f91531 /tests/stack.nim | |
parent | Cosmetics (diff) | |
download | nimfunge98-1d11df68fc011a023e19b4ec7db4df73bef331d7.tar.gz nimfunge98-1d11df68fc011a023e19b4ec7db4df73bef331d7.tar.bz2 nimfunge98-1d11df68fc011a023e19b4ec7db4df73bef331d7.zip |
Implemented the stackstack
Diffstat (limited to 'tests/stack.nim')
-rw-r--r-- | tests/stack.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/stack.nim b/tests/stack.nim index 0f7e4c8..cb49daf 100644 --- a/tests/stack.nim +++ b/tests/stack.nim @@ -130,6 +130,13 @@ suite "Stack": check full.data[0] == 1 check empty.data[0] == 2 check empty.data[1] == 3 + test "Discard": + var empty = NewStack() + empty[].Discard(1) + check empty.height == 0 + empty[].Push(2) + empty[].Discard(3) + check empty.height == 0 test "Next": var empty = NewStack() check empty[].Next() == nil |