Skip to content

Commit

Permalink
Test that get_symtab works when DSKIP has a named constant argument
Browse files Browse the repository at this point in the history
Resolves #35
  • Loading branch information
iafisher committed Dec 18, 2018
1 parent 963854a commit b08f28e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/test_symtab.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ def test_get_symtab_with_dskip():
assert labels["data2"] == HERA_DATA_START + 11


def test_get_symtab_with_dskip_and_constant():
labels = get_symtab(
[
Op("CONSTANT", ["N", 50]),
Op("DLABEL", ["x"]),
Op("DSKIP", ["N"]), # Using constant value in DSKIP.
Op("DLABEL", ["y"]),
]
)
assert len(labels) == 3
assert labels["N"] == 50
assert labels["x"] == HERA_DATA_START
assert labels["y"] == HERA_DATA_START + 50


def test_get_symtab_with_lp_string():
labels = get_symtab(
[
Expand Down

0 comments on commit b08f28e

Please sign in to comment.