From 167b0386378346cadde0008b023a2c8ac143d2fd Mon Sep 17 00:00:00 2001 From: Tianyi Liang Date: Thu, 20 Feb 2014 17:16:43 -0600 Subject: [PATCH] add two cases to the regression test --- test/regress/regress0/strings/Makefile.am | 2 ++ test/regress/regress0/strings/int2str.smt2 | 18 ++++++++++++++++++ test/regress/regress0/strings/str2int.smt2 | 12 ++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 test/regress/regress0/strings/int2str.smt2 create mode 100644 test/regress/regress0/strings/str2int.smt2 diff --git a/test/regress/regress0/strings/Makefile.am b/test/regress/regress0/strings/Makefile.am index a2142eeb3..d9f0f597c 100644 --- a/test/regress/regress0/strings/Makefile.am +++ b/test/regress/regress0/strings/Makefile.am @@ -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 index 000000000..ac4d9ab8a --- /dev/null +++ b/test/regress/regress0/strings/int2str.smt2 @@ -0,0 +1,18 @@ +(set-logic QF_S) +(set-info :status sat) +(set-option :strings-exp true) + +(declare-fun x () String) +(declare-fun y () String) +(declare-fun z () String) +(declare-fun i () Int) + +(assert (>= i 420)) +(assert (= x (int.to.str i))) +(assert (= x (str.++ y "0" z))) +(assert (not (= y ""))) +(assert (not (= z ""))) + + + +(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 index 000000000..b8f0ac5ae --- /dev/null +++ b/test/regress/regress0/strings/str2int.smt2 @@ -0,0 +1,12 @@ +(set-logic QF_S) +(set-info :status sat) +(set-option :strings-exp true) + +(declare-fun i () Int) +(declare-fun s () String) + +(assert (< 67 (str.to.int s))) +(assert (= (str.len s) 2)) +(assert (not (= s "68"))) + +(check-sat) -- 2.30.2