Skip to content

Commit

Permalink
Add unit test for ada module
Browse files Browse the repository at this point in the history
Ref. #500
  • Loading branch information
treiher committed Dec 3, 2020
1 parent 48f98f2 commit 8c014e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unit/ada_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ def test_attribute_expression_str() -> None:
assert str(ada.Val("X", ada.Number(1))) == "X'Val (1)"


def test_selected_str() -> None:
assert str(ada.Selected(ada.Variable("X"), "Y")) == "X.Y"
assert str(-ada.Selected(ada.Variable("X"), "Y")) == "(-X.Y)"


def test_indexed_str() -> None:
assert str(ada.Indexed(ada.Variable("X"), ada.Variable("Y"))) == "X (Y)"
assert str(-ada.Indexed(ada.Variable("X"), ada.Variable("Y"))) == "(-X (Y))"
Expand Down

0 comments on commit 8c014e0

Please sign in to comment.