mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
Creating the *real* autotest nest
git-svn-id: svn://ultimatepp.org/upp/trunk@7141 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
dc9a464a45
commit
6d3aa8ba61
230 changed files with 9963 additions and 73 deletions
16
autotest/ConvertOverflow/ConvertOverflow.cpp
Normal file
16
autotest/ConvertOverflow/ConvertOverflow.cpp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#define CHECK_OVERFLOW(s, cls, overflow) { cls x; Value v = x.Scan(s); LOG(s << " -> " << v); ASSERT(v.IsError() == overflow); }
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
StdLogSetup(LOG_FILE|LOG_COUT);
|
||||
|
||||
CHECK_OVERFLOW("2147483647", ConvertInt, false);
|
||||
CHECK_OVERFLOW("2147483648", ConvertInt, true);
|
||||
|
||||
CHECK_OVERFLOW("-2147483647", ConvertInt, false);
|
||||
CHECK_OVERFLOW("-2147483648", ConvertInt, true);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue