mirror of
https://github.com/Z3Prover/z3
synced 2025-06-12 17:06:14 +00:00
update doctest
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
35e8decdb1
commit
a63d1b1848
1 changed files with 2 additions and 4 deletions
|
@ -3836,7 +3836,7 @@ def Extract(high, low, a):
|
||||||
>>> Extract(6, 2, x).sort()
|
>>> Extract(6, 2, x).sort()
|
||||||
BitVec(5)
|
BitVec(5)
|
||||||
>>> simplify(Extract(StringVal("abcd"),2,1))
|
>>> simplify(Extract(StringVal("abcd"),2,1))
|
||||||
"c"
|
c
|
||||||
"""
|
"""
|
||||||
if isinstance(high, str):
|
if isinstance(high, str):
|
||||||
high = StringVal(high)
|
high = StringVal(high)
|
||||||
|
@ -9995,8 +9995,6 @@ def Strings(names, ctx=None):
|
||||||
def Empty(s):
|
def Empty(s):
|
||||||
"""Create the empty sequence of the given sort
|
"""Create the empty sequence of the given sort
|
||||||
>>> e = Empty(StringSort())
|
>>> e = Empty(StringSort())
|
||||||
>>> print(e)
|
|
||||||
""
|
|
||||||
>>> e2 = StringVal("")
|
>>> e2 = StringVal("")
|
||||||
>>> print(e.eq(e2))
|
>>> print(e.eq(e2))
|
||||||
True
|
True
|
||||||
|
@ -10082,7 +10080,7 @@ def Replace(s, src, dst):
|
||||||
"""Replace the first occurrence of 'src' by 'dst' in 's'
|
"""Replace the first occurrence of 'src' by 'dst' in 's'
|
||||||
>>> r = Replace("aaa", "a", "b")
|
>>> r = Replace("aaa", "a", "b")
|
||||||
>>> simplify(r)
|
>>> simplify(r)
|
||||||
"baa"
|
baa
|
||||||
"""
|
"""
|
||||||
ctx = _get_ctx2(dst, s)
|
ctx = _get_ctx2(dst, s)
|
||||||
if ctx is None and is_expr(src):
|
if ctx is None and is_expr(src):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue