diff --git a/upptst/ScalarDate/ScalarDate.cpp b/upptst/ScalarDate/ScalarDate.cpp new file mode 100644 index 000000000..f48d0e9b8 --- /dev/null +++ b/upptst/ScalarDate/ScalarDate.cpp @@ -0,0 +1,21 @@ +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + Date d; + + d.Set(Null); + ASSERT(IsNull(d)); + + d.Set(0); + ASSERT(d == Date(0, 1, 1)); + + for(int i = 0; i < 800000; i++) { + d.Set(i); + Date d1 = d; + d.Set(d.Get()); + ASSERT(d1 == d); + } +} diff --git a/upptst/ScalarDate/ScalarDate.upp b/upptst/ScalarDate/ScalarDate.upp new file mode 100644 index 000000000..9f0683410 --- /dev/null +++ b/upptst/ScalarDate/ScalarDate.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + ScalarDate.cpp; + +mainconfig + "" = "SSE2"; + diff --git a/upptst/ScalarDate/init b/upptst/ScalarDate/init new file mode 100644 index 000000000..23cd3f5b7 --- /dev/null +++ b/upptst/ScalarDate/init @@ -0,0 +1,4 @@ +#ifndef _ScalarDate_icpp_init_stub +#define _ScalarDate_icpp_init_stub +#include "Core/init" +#endif