summaryrefslogtreecommitdiff
path: root/test/unit/api/python/test_term.py
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-09-02 16:02:41 -0500
committerGitHub <noreply@github.com>2020-09-02 16:02:41 -0500
commit2d6d62b7bc0c15a44b38641a52ba389591ecc7f6 (patch)
treee11ae0a24c157cf01dbcf287727240b4e75b7b8a /test/unit/api/python/test_term.py
parentdba70e10ef8ae0a991969cb7ca0cba2d0e9d9d4d (diff)
parent0f9fb31069d51e003a39b0e93f506324dec2bdac (diff)
Merge branch 'master' into fixCMSBuildPRfixCMSBuildPR
Diffstat (limited to 'test/unit/api/python/test_term.py')
-rw-r--r--test/unit/api/python/test_term.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/api/python/test_term.py b/test/unit/api/python/test_term.py
index b135e4510..ca8d4c741 100644
--- a/test/unit/api/python/test_term.py
+++ b/test/unit/api/python/test_term.py
@@ -4,6 +4,17 @@ import pycvc4
from pycvc4 import kinds
+def test_getitem():
+ solver = pycvc4.Solver()
+ intsort = solver.getIntegerSort()
+ x = solver.mkConst(intsort, 'x')
+ y = solver.mkConst(intsort, 'y')
+ xpy = solver.mkTerm(kinds.Plus, x, y)
+
+ assert xpy[0] == x
+ assert xpy[1] == y
+
+
def test_get_kind():
solver = pycvc4.Solver()
intsort = solver.getIntegerSort()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback