mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.autotests
git-svn-id: svn://ultimatepp.org/upp/trunk@7164 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
7df7017b8e
commit
0cfdc224aa
8 changed files with 44 additions and 24 deletions
|
|
@ -30,8 +30,10 @@ CONSOLE_APP_MAIN
|
|||
ns.ZeroTerminated(sz);
|
||||
|
||||
SeedRandom();
|
||||
for(int i = 0; i < 140000000; i++) {
|
||||
if(i % 10000000 == 0)
|
||||
int i = 0;
|
||||
int time0 = msecs();
|
||||
while(msecs(time0) < 20000) {
|
||||
if(++i % 10000000 == 0)
|
||||
RLOG("Created " << i);
|
||||
String s = pass ? "x" : RandomString(Random(4) ? 5 : 50);
|
||||
ws.Add(ns.Add(s));
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ CONSOLE_APP_MAIN
|
|||
out.Put64(big, sz);
|
||||
LOG("Saved");
|
||||
}
|
||||
ASSERT(GetFileLength(path) == sz);
|
||||
{
|
||||
FileIn in(path);
|
||||
for(int64 i = 0; i < sz; i++)
|
||||
|
|
@ -31,5 +32,6 @@ CONSOLE_APP_MAIN
|
|||
for(int64 i = 0; i < sz; i++)
|
||||
ASSERT(big[i] == i % 123);
|
||||
}
|
||||
DeleteFile(path);
|
||||
LOG("Test passed OK");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "#WAIT: 20\377";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,10 @@ void Check(T haystack, T needle, int pos)
|
|||
template <class T>
|
||||
void Check()
|
||||
{
|
||||
|
||||
for(int l = 0; l < 30; l++) {
|
||||
for(int r = 0; r < 30; r++) {
|
||||
int time0 = msecs();
|
||||
while(msecs(time0) < 60000) {
|
||||
int l = Random(40);
|
||||
int r = Random(40);
|
||||
LOG(l << ":" << r);
|
||||
for(int nl = 0; nl < 30; nl++)
|
||||
for(int nr = 0; nr < 30; nr++)
|
||||
|
|
@ -42,7 +43,6 @@ void Check()
|
|||
Check(T('b', l) + needle + T('c', r), needle, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(T("test").Find("x") < 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,6 @@
|
|||
|
||||
using namespace Upp;
|
||||
|
||||
#ifdef flagLONG
|
||||
#define N 100000000
|
||||
#else
|
||||
#define N 1000000
|
||||
#endif
|
||||
|
||||
String RandomString(int n)
|
||||
{
|
||||
String h;
|
||||
|
|
@ -20,8 +14,10 @@ CONSOLE_APP_MAIN
|
|||
{
|
||||
StringStream ss;
|
||||
String es;
|
||||
for(int i = 0; i < 100000000; i++) {
|
||||
if(i % 10000 == 0)
|
||||
int time0 = msecs();
|
||||
int i = 0;
|
||||
while(msecs(time0) < 150000) {
|
||||
if(++i % 10000 == 0)
|
||||
Cout() << i << "\r\n";
|
||||
int p = Random(1000);
|
||||
String h = RandomString(p);
|
||||
|
|
|
|||
14
autotest/XmlStream/3.xml
Normal file
14
autotest/XmlStream/3.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TcEventSources>
|
||||
<Source>
|
||||
<Id>551</Id>
|
||||
<Event>
|
||||
<Id>201</Id>
|
||||
<!-- Rumpftyp : NC-Programm, additional ID 23 bis 30 -->
|
||||
<Message LcId="2052">
|
||||
<!-- %1 '%13' @CH:%2 @KLASSE:%3/%4 @N:%23 @PRG:%24 @DATEI:%25 @V1:%14 @V2:%15 @V3:%16 @V4: @V5: @K1:%19 @K2:%20 @K3:%21 @K4:%22 @TYP:%12 @PFAD:%29 @FOFFS:%26 @BOFFS:%27 @TOFFS:%28 @PINFO:%30 @MODUL:%5 @ZEILE:%6 @MID:%7 @BF:%8 @COM:%9 @VER:%11 @ZEIT:%10 -->
|
||||
%1 '%13' @CH:%2 @CLASS:%3/%4 @N:%23 @PRG:%24 @FILE:%25 @V1:%14 @V2:%15 @V3:%16 @V4:%17 @V5:%18 @K1:%19 @K2:%20 @K3:%21 @K4:%22 @TYPE:%12 @PATH:%29 @FOFFS:%26 @BOFFS:%27 @TOFFS:%28 @PINFO:%30 @MODUL:%5 @LINE:%6 @MID:%7 @BF:%8 @COM:%9 @VER:%11 @TIME:%10
|
||||
</Message>
|
||||
</Event>
|
||||
</Source>
|
||||
</TcEventSources>
|
||||
|
|
@ -73,9 +73,12 @@ CONSOLE_APP_MAIN
|
|||
|
||||
LOG("----- Fixed files OK");
|
||||
|
||||
return;
|
||||
SeedRandom();
|
||||
|
||||
for(int i = 0; i < 100; i++) {
|
||||
int time0 = msecs();
|
||||
|
||||
while(msecs(time0) < 150000) {
|
||||
LOG("* " << i);
|
||||
XmlNode n;
|
||||
XmlNode& nn = n.Add();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ file
|
|||
XmlStream.cpp,
|
||||
0.xml,
|
||||
1.xml,
|
||||
2.xml;
|
||||
2.xml,
|
||||
3.xml;
|
||||
|
||||
mainconfig
|
||||
"" = "SSE2 TEST_XML";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue