Skip to content

Commit

Permalink
Update test_pdastack.py
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotwrobson committed Oct 21, 2023
1 parent 44331d2 commit 7f38399
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_pdastack.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,13 @@ def test_stack_get(self) -> None:
def test_stack_repr(self) -> None:
"""Should create proper string representation of PDA stack."""
self.assertEqual(repr(self.stack), "PDAStack(('a', 'b'))")

def test_stack_equality(self) -> None:
"""Should only be equal for equal configurations."""
stack = PDAStack(["a", "b"])

self.assertEqual(stack, stack)
self.assertEqual(stack, PDAStack(["a", "b"]))

self.assertNotEqual(stack, PDAStack(["a", "a"]))
self.assertNotEqual(stack, PDAStack(["b", "b"]))

0 comments on commit 7f38399

Please sign in to comment.