add two cases to the regression test
authorTianyi Liang <tianyi-liang@uiowa.edu>
Thu, 20 Feb 2014 23:16:43 +0000 (17:16 -0600)
committerTianyi Liang <tianyi-liang@uiowa.edu>
Thu, 20 Feb 2014 23:16:43 +0000 (17:16 -0600)
test/regress/regress0/strings/Makefile.am
test/regress/regress0/strings/int2str.smt2 [new file with mode: 0644]
test/regress/regress0/strings/str2int.smt2 [new file with mode: 0644]

index a2142eeb38e253331c47118b8c0e3cdce4f635ae..d9f0f597c08bcb147d22d80be9be6bb65496a4e1 100644 (file)
@@ -30,6 +30,8 @@ TESTS =       \
   str007.smt2 \
   fmf001.smt2 \
   fmf002.smt2 \
+  int2str.smt2 \
+  str2int.smt2 \
   model001.smt2 \
   substr001.smt2 \
   regexp001.smt2 \
diff --git a/test/regress/regress0/strings/int2str.smt2 b/test/regress/regress0/strings/int2str.smt2
new file mode 100644 (file)
index 0000000..ac4d9ab
--- /dev/null
@@ -0,0 +1,18 @@
+(set-logic QF_S)\r
+(set-info :status sat)\r
+(set-option :strings-exp true)\r
+\r
+(declare-fun x () String)\r
+(declare-fun y () String)\r
+(declare-fun z () String)\r
+(declare-fun i () Int)\r
+\r
+(assert (>= i 420))\r
+(assert (= x (int.to.str i)))\r
+(assert (= x (str.++ y "0" z)))\r
+(assert (not (= y "")))\r
+(assert (not (= z "")))\r
+\r
+\r
+\r
+(check-sat)
\ No newline at end of file
diff --git a/test/regress/regress0/strings/str2int.smt2 b/test/regress/regress0/strings/str2int.smt2
new file mode 100644 (file)
index 0000000..b8f0ac5
--- /dev/null
@@ -0,0 +1,12 @@
+(set-logic QF_S)\r
+(set-info :status sat)\r
+(set-option :strings-exp true)\r
+\r
+(declare-fun i () Int)\r
+(declare-fun s () String)\r
+\r
+(assert (< 67 (str.to.int s)))\r
+(assert (= (str.len s) 2))\r
+(assert (not (= s "68")))\r
+\r
+(check-sat)\r