.autotest

git-svn-id: svn://ultimatepp.org/upp/trunk@8653 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-07-09 07:02:15 +00:00
parent a9562a1575
commit e211ae3e5f
3 changed files with 45 additions and 0 deletions

32
autotest/Nvl/Nvl.cpp Normal file
View file

@ -0,0 +1,32 @@
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
int x = Null;
ASSERT(Nvl(1, 2, 3, 4, 5) == 1);
ASSERT(Nvl(x, 2, 3, 4, 5) == 2);
ASSERT(Nvl(x, x, 3, 4, 5) == 3);
ASSERT(Nvl(x, x, x, 4, 5) == 4);
ASSERT(Nvl(x, x, x, x, 5) == 5);
ASSERT(Nvl(1, x, 3, x, 5) == 1);
ASSERT(Nvl(x, x, 3, x, 5) == 3);
ASSERT(IsNull(Nvl(x, x, x, x, x)));
ASSERT(Nvl(1, 2, 3, 4) == 1);
ASSERT(Nvl(x, 2, 3, 4) == 2);
ASSERT(Nvl(x, x, 3, 4) == 3);
ASSERT(Nvl(x, x, x, 4) == 4);
ASSERT(Nvl(1, x, 3, x) == 1);
ASSERT(Nvl(x, x, 3, x) == 3);
ASSERT(IsNull(Nvl(x, x, x, x)));
ASSERT(Nvl(1, 2, 3) == 1);
ASSERT(Nvl(x, 2, 3) == 2);
ASSERT(Nvl(x, x, 3) == 3);
ASSERT(Nvl(1, x, 3) == 1);
ASSERT(Nvl(x, x, 3) == 3);
ASSERT(IsNull(Nvl(x, x, x)));
}

9
autotest/Nvl/Nvl.upp Normal file
View file

@ -0,0 +1,9 @@
uses
Core;
file
Nvl.cpp;
mainconfig
"" = "";

4
autotest/Nvl/init Normal file
View file

@ -0,0 +1,4 @@
#ifndef _Nvl_icpp_init_stub
#define _Nvl_icpp_init_stub
#include "Core/init"
#endif