Skip to content

Commit

Permalink
Couple sanity checks and docs in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
idavis committed Oct 15, 2024
1 parent 26c6690 commit eb11c72
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pyqir/tests/test_value_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ def test_function_name_can_contain_spaces_and_chars() -> None:
expected = "Some - ; name fin"
mod.entry_point.name = expected

# verify the name is use and wrapped in quotes
assert f"@\"{expected}\"() #0" in mod.ir()
# verify we can find it by name

# verify we can find it by name without having to use quotes
func = next(filter(lambda f: f.name == expected, mod._module.functions))
assert func == mod.entry_point

# Double check that the module is valid with this kind of name
mod = pyqir.Module.from_ir(Context(), mod.ir())
assert mod.verify() is None

0 comments on commit eb11c72

Please sign in to comment.