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@6787 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
bab83f84c0
commit
644e046cf0
3 changed files with 38 additions and 0 deletions
9
upptst/NaNINF/NaNINF.upp
Normal file
9
upptst/NaNINF/NaNINF.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
NaNInf.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "SSE2";
|
||||
|
||||
25
upptst/NaNINF/NaNInf.cpp
Normal file
25
upptst/NaNINF/NaNInf.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
double d = 0;
|
||||
ASSERT(!IsNaN(d));
|
||||
ASSERT(!IsInf(d));
|
||||
ASSERT(IsFin(d));
|
||||
|
||||
d = sqrt(-1.0);
|
||||
ASSERT(IsNaN(d));
|
||||
ASSERT(!IsInf(d));
|
||||
|
||||
d = 1e300;
|
||||
d *= d;
|
||||
ASSERT(!IsNaN(d));
|
||||
ASSERT(IsInf(d));
|
||||
|
||||
d = 1e300;
|
||||
d *= -d;
|
||||
ASSERT(!IsNaN(d));
|
||||
ASSERT(IsInf(d));
|
||||
}
|
||||
4
upptst/NaNINF/init
Normal file
4
upptst/NaNINF/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _NaNInf_icpp_init_stub
|
||||
#define _NaNInf_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue