From a53e24f36466cb1cced0d374edba1b539e1663d8 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 5 Aug 2014 17:20:19 +0000 Subject: [PATCH] .autotest git-svn-id: svn://ultimatepp.org/upp/trunk@7563 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- autotest/Convert/Convert.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/autotest/Convert/Convert.cpp b/autotest/Convert/Convert.cpp index 6c533a5ba..4bbd62f27 100644 --- a/autotest/Convert/Convert.cpp +++ b/autotest/Convert/Convert.cpp @@ -84,4 +84,22 @@ CONSOLE_APP_MAIN Test(d, "1.1E-10", 1.1E-10); Test(d, "+1.1E-10", 1.1E-10); Test(d, "-1.1E-10", -1.1E-10); + + ConvertInt x; + Test(x, "12-12", ErrorValue()); + Test(x, "12+12", ErrorValue()); + Test(x, "12.-12", ErrorValue()); + Test(x, "12.+12", ErrorValue()); + Test(x, "a", ErrorValue()); + Test(x, " ", ErrorValue()); + + ConvertInt64 xx; + Test(xx, "12-12", ErrorValue()); + Test(xx, "12+12", ErrorValue()); + Test(xx, "12.-12", ErrorValue()); + Test(xx, "12.+12", ErrorValue()); + Test(xx, "a", ErrorValue()); + Test(xx, " ", ErrorValue()); + + ASSERT(StrDbl("123xxx") == 123); }