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@6609 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
05fc95b546
commit
87a223a54d
3 changed files with 50 additions and 0 deletions
37
upptst/Convert/Convert.cpp
Normal file
37
upptst/Convert/Convert.cpp
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
StdLogSetup(LOG_FILE|LOG_COUT);
|
||||
|
||||
SetLanguage(LNG_('C','S','C','Z'));
|
||||
|
||||
ConvertTime cv;
|
||||
|
||||
DUMP(cv.Format(Date(2013, 1, 2)));
|
||||
ASSERT(cv.Format(Date(2013, 1, 2)) == "02.01.2013");
|
||||
|
||||
DUMP(cv.Format(Time(2013, 1, 2)));
|
||||
ASSERT(cv.Format(Time(2013, 1, 2)) == "02.01.2013");
|
||||
|
||||
DUMP(cv.Format(Time(2013, 1, 2, 11, 12, 13)));
|
||||
ASSERT(cv.Format(Time(2013, 1, 2, 11, 12, 13)) == "02.01.2013 11:12:13");
|
||||
|
||||
cv.TimeAlways();
|
||||
|
||||
DUMP(cv.Format(Date(2013, 1, 2)));
|
||||
ASSERT(cv.Format(Date(2013, 1, 2)) == "02.01.2013 00:00:00");
|
||||
|
||||
DUMP(cv.Format(Time(2013, 1, 2, 11, 12, 13)));
|
||||
ASSERT(cv.Format(Time(2013, 1, 2, 11, 12, 13)) == "02.01.2013 11:12:13");
|
||||
|
||||
DUMP(cv.Scan("15.6.2010"));
|
||||
ASSERT(cv.Scan("15.6.2010") == Time(2010, 6, 15, 0, 0, 0));
|
||||
|
||||
cv.DayEnd();
|
||||
|
||||
DUMP(cv.Scan("15.6.2010"));
|
||||
ASSERT(cv.Scan("15.6.2010") == Time(2010, 6, 15, 23, 59, 59));
|
||||
}
|
||||
9
upptst/Convert/Convert.upp
Normal file
9
upptst/Convert/Convert.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
Convert.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "SSE2";
|
||||
|
||||
4
upptst/Convert/init
Normal file
4
upptst/Convert/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _Convert_icpp_init_stub
|
||||
#define _Convert_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue