mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.upptst: StrToTime
git-svn-id: svn://ultimatepp.org/upp/trunk@2925 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
23ed79e8b5
commit
6b596d94f2
2 changed files with 36 additions and 0 deletions
25
upptst/StrToTime/StrToTime.cpp
Normal file
25
upptst/StrToTime/StrToTime.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
void Test(const char *text)
|
||||
{
|
||||
Time tm;
|
||||
const char *q = StrToTime(tm, text);
|
||||
if(q)
|
||||
LOG(text << " -> " << tm << ", follows: " << q);
|
||||
else
|
||||
LOG("FAILED: " << text);
|
||||
}
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
SetLanguage(LNG_CZECH);
|
||||
Test("15.12.2005 23:10:20 hello!");
|
||||
Test("15.12.2005 hello!");
|
||||
Test("15.12.2005 12:10 foo!");
|
||||
Test("15.12.2005 12 foo!");
|
||||
Test("15.12.2005 foo!");
|
||||
Test("uck!");
|
||||
}
|
||||
|
||||
11
upptst/StrToTime/StrToTime.upp
Normal file
11
upptst/StrToTime/StrToTime.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
description "String to time conversion test\377";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
StrToTime.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue