MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / test_bv2int

Method test_bv2int

tests/test_z3_compat.py:946–953  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

944 assert r.size() == 16
945
946 def test_bv2int(self):
947 x = BitVec("x", 8)
948 r = BV2Int(x) # default is_signed=False → unsigned (BV2NAT)
949 assert isinstance(r._ast, UnOpNode) and r._ast.op == UnOp.BV2NAT
950 assert r.sort() == IntSort()
951 # is_signed=True → signed (BV2INT)
952 r2 = BV2Int(x, is_signed=True)
953 assert isinstance(r2._ast, UnOpNode) and r2._ast.op == UnOp.BV2INT
954
955 def test_int2bv(self):
956 x = Int("x")

Callers

nothing calls this directly

Calls 4

BitVecFunction · 0.90
BV2IntFunction · 0.90
IntSortFunction · 0.90
sortMethod · 0.45

Tested by

no test coverage detected