mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@14836 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
82b1c65236
commit
c75c78bf87
4 changed files with 39 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
8
autotest/VectorArrayN/Etalon.log
Normal file
8
autotest/VectorArrayN/Etalon.log
Normal 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]
|
||||
18
autotest/VectorArrayN/VectorArrayN.cpp
Normal file
18
autotest/VectorArrayN/VectorArrayN.cpp
Normal 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();
|
||||
}
|
||||
12
autotest/VectorArrayN/VectorArrayN.upp
Normal file
12
autotest/VectorArrayN/VectorArrayN.upp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
description "Tests Vector/Array constructors with defined number of items\377";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
Etalon.log,
|
||||
VectorArrayN.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue