Skip to content

Commit 0c6264b

Browse files
masinagmvcisback
authored andcommitted
test(parser): Add test for file with no symbol table and no comments.
1 parent 465c96a commit 0c6264b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/test_parser.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,23 @@ def test_io_order():
149149
== circ4(data)
150150

151151

152+
TEST_NO_SYMBOL_TABLE = """aag 4 2 1 1 1
153+
2
154+
4
155+
6 2
156+
8
157+
8 7 5
158+
"""
159+
160+
161+
@given(st.data())
162+
def test_no_symbol_table(data):
163+
circ1 = aigp.parse(TEST_NO_SYMBOL_TABLE)
164+
circ2 = aigp.parse(str(circ1))
165+
test_input = {f'{i}': data.draw(st.booleans()) for i in circ1.inputs}
166+
assert circ1(test_input) == circ2(test_input)
167+
168+
152169
# ----------- BINARY FILE PARSER TESTS ----------------
153170

154171
@given(st.data())

0 commit comments

Comments
 (0)