git-svn-id: svn://ultimatepp.org/upp/trunk@7227 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-04-12 11:58:59 +00:00
parent cf3c3c7e7c
commit 9db077ed90
3 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,45 @@
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
String rndset;
rndset << "[]<>;`%%%%";
rndset << rndset;
rndset << rndset;
rndset << rndset;
for(int i = 32; i < 128; i++)
if(IsAlpha(i) || IsDigit(i))
rndset.Cat(i);
SeedRandom();
int time0 = msecs();
while(msecs(time0) < 150000) {
String fmtstr;
while(Random(20))
fmtstr << (char)rndset[Random(rndset.GetCount())];
Vector<Value> v;
for(;;) {
int q = Random(5);
if(q == 0)
break;
switch(q) {
case 1:
v.Add((int)Random(100));
break;
case 2:
v.Add(AsString(Random(100)));
break;
case 3:
v.Add(GetSysDate() + Random(100));
break;
}
}
DUMP(fmtstr);
DUMP(v);
DUMP(NFormat(fmtstr, v));
}
LOG("============ OK");
}

View file

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

4
uppdev/FormatUnsafe/init Normal file
View file

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