summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2016-12-01 10:47:31 -0600
committerajreynol <andrew.j.reynolds@gmail.com>2016-12-01 10:47:47 -0600
commitffaf556b34e3ef2972b47caea00b7da149aeea8f (patch)
tree0fd3616edf9aed8447bce1ffaa5e444d8824e43c /test
parent154002c3a1b07ead16cfcac05a7580abc424e472 (diff)
Improvement and bug fix for str.indexof reduction, add regression. Other minor changes.
Diffstat (limited to 'test')
-rw-r--r--test/regress/regress0/strings/Makefile.am3
-rw-r--r--test/regress/regress0/strings/strings-index-empty.smt211
2 files changed, 13 insertions, 1 deletions
diff --git a/test/regress/regress0/strings/Makefile.am b/test/regress/regress0/strings/Makefile.am
index 21d51199d..70fec7b82 100644
--- a/test/regress/regress0/strings/Makefile.am
+++ b/test/regress/regress0/strings/Makefile.am
@@ -83,7 +83,8 @@ TESTS = \
csp-prefix-exp-bug.smt2 \
cmu-substr-rw.smt2 \
gm-inc-071516-2.smt2 \
- cmu-inc-nlpp-071516.smt2
+ cmu-inc-nlpp-071516.smt2 \
+ strings-index-empty.smt2
FAILING_TESTS =
diff --git a/test/regress/regress0/strings/strings-index-empty.smt2 b/test/regress/regress0/strings/strings-index-empty.smt2
new file mode 100644
index 000000000..a726d9cab
--- /dev/null
+++ b/test/regress/regress0/strings/strings-index-empty.smt2
@@ -0,0 +1,11 @@
+; COMMAND-LINE: --simplification=none --strings-exp --no-strings-lazy-pp
+; EXPECT: sat
+(set-logic SLIA)
+(set-info :status sat)
+(declare-fun x () String)
+(declare-fun f () String)
+(declare-fun y () Int)
+(assert (= (str.len f) 0))
+; command line options ensure reduction is invoked for indexof, f is "", should return -1
+(assert (= (str.indexof x f 4) y))
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback