mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@6608 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
7fe1059013
commit
05fc95b546
3 changed files with 29 additions and 0 deletions
16
upptst/ConvertOverflow/ConvertOverflow.cpp
Normal file
16
upptst/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); }
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
StdLogSetup(LOG_FILE|LOG_COUT);
|
||||
|
||||
CHECK_OVERFLOW("2147483647", ConvertInt, false);
|
||||
CHECK_OVERFLOW("2147483648", ConvertInt, true);
|
||||
|
||||
CHECK_OVERFLOW("-2147483648", ConvertInt, false);
|
||||
CHECK_OVERFLOW("-2147483649", ConvertInt, true);
|
||||
}
|
||||
9
upptst/ConvertOverflow/ConvertOverflow.upp
Normal file
9
upptst/ConvertOverflow/ConvertOverflow.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
ConvertOverflow.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "SSE2";
|
||||
|
||||
4
upptst/ConvertOverflow/init
Normal file
4
upptst/ConvertOverflow/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _ConvertOverflow_icpp_init_stub
|
||||
#define _ConvertOverflow_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue