.autotest

git-svn-id: svn://ultimatepp.org/upp/trunk@14836 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-08-19 08:46:49 +00:00
parent 82b1c65236
commit c75c78bf87
4 changed files with 39 additions and 14 deletions

View file

@ -371,20 +371,7 @@ CONSOLE_APP_MAIN
DDUMP(x);
}
auto LoadLog = [](const String& path) {
String s = Filter(LoadFile(path), [](int c) { return c == '\r' ? 0 : c; });
return s.Mid(max(s.FindAfter("\n"), 0));
};
String log = LoadLog(GetStdLogPath());
String etalon = LoadLog(GetDataFile("Etalon.log"));
SaveFile(GetHomeDirFile("log.txt"), log);
SaveFile(GetHomeDirFile("etalon.txt"), etalon);
ASSERT(log == etalon);
Cout() << "================= OK\r\n";
CheckLogEtalon();
#else
Cout() << "================= NO SIMD\r\n";
#endif

View file

@ -0,0 +1,8 @@
* C:\upp\out\autotest\MSBT19.Debug.Debug_Full\VectorArrayN.exe 19.08.2020 10:14:47, user: cxl
x.GetCount() = 20
x = [123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123]
x = [123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123]
x.GetCount() = 20
x = [123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123]
x = [123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123]

View file

@ -0,0 +1,18 @@
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
{ Vector<int> x(20); DUMP(x.GetCount()); }
{ Vector<int> x(20, 123); DUMP(x); }
{ Vector<String> x(20, "123"); DUMP(x); }
{ Array<int> x(20); DUMP(x.GetCount()); }
{ Array<int> x(20, 123); DUMP(x); }
{ Array<String> x(20, "123"); DUMP(x); }
CheckLogEtalon();
}

View file

@ -0,0 +1,12 @@
description "Tests Vector/Array constructors with defined number of items\377";
uses
Core;
file
Etalon.log,
VectorArrayN.cpp;
mainconfig
"" = "";