summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-02-22 14:08:13 -0600
committerGitHub <noreply@github.com>2018-02-22 14:08:13 -0600
commitf7a77c4c14af25466e7ce31455a9636e0f8234e3 (patch)
treec2ceecbc802d0869871ce8b73b38b8842257dfc3 /test
parent54321626c1939b055b2b48f15e9bdb3844abb89c (diff)
Minor improvements to string rewriter (#1572)
Diffstat (limited to 'test')
-rw-r--r--test/regress/regress1/strings/Makefile.am3
-rw-r--r--test/regress/regress1/strings/rew-020618.smt218
2 files changed, 20 insertions, 1 deletions
diff --git a/test/regress/regress1/strings/Makefile.am b/test/regress/regress1/strings/Makefile.am
index 8ccf3f81d..400ee7cff 100644
--- a/test/regress/regress1/strings/Makefile.am
+++ b/test/regress/regress1/strings/Makefile.am
@@ -71,7 +71,8 @@ TESTS = \
repl-soundness-sem.smt2 \
str001.smt2 \
str002.smt2 \
- str007.smt2
+ str007.smt2 \
+ rew-020618.smt2
EXTRA_DIST = $(TESTS)
diff --git a/test/regress/regress1/strings/rew-020618.smt2 b/test/regress/regress1/strings/rew-020618.smt2
new file mode 100644
index 000000000..5fb58a272
--- /dev/null
+++ b/test/regress/regress1/strings/rew-020618.smt2
@@ -0,0 +1,18 @@
+; COMMAND-LINE: --strings-exp
+; EXPECT: unsat
+(set-logic ALL)
+(set-info :status unsat)
+(declare-fun s () String)
+
+(assert (or
+(= (str.++ s "A") "")
+(= (str.++ s s) "A")
+(not (str.contains s ""))
+(str.contains "" (str.++ s "A"))
+(not (= (str.replace "A" s "A") "A"))
+(not (= (str.prefixof s "A") (str.suffixof s "A")))
+(not (str.prefixof s s))
+(not (str.prefixof "" s))
+)
+)
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback