Files

79 lines
1.9 KiB
C++
Raw Permalink Normal View History

2020-08-16 11:10:43 +02:00
/*
* This file is part of the Flowee project
2021-03-05 19:10:51 +01:00
* Copyright (C) 2018-2021 Tom Zander <tom@flowee.org>
2020-08-16 11:10:43 +02:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "blocksdb_tests.h"
2022-12-11 20:05:46 +01:00
#include "base58_tests.h"
2021-03-05 19:10:51 +01:00
#include "MetaBlock_tests.h"
2022-02-22 17:05:55 +01:00
#include "address_manager_tests.h"
#include "univalue_tests.h"
2020-08-16 11:10:43 +02:00
int main(int x, char**y)
2020-08-16 11:10:43 +02:00
{
/*
QCoreApplication app(x, y);
QFile block("block");
block.open(QIODevice::ReadOnly);
auto d = block.readAll();
QFile out("blockdata");
out.open(QIODevice::WriteOnly);
bool even = false;
uint8_t byte = 0;
for (uint8_t k : d) {
if (k <= '9')
k -= '0';
else
k = k + 10 - 'a';
if (even) {
byte += k;
char buf[1];
buf[0] = byte;
out.write(buf, 1);
} else {
byte = k << 4;
}
even = !even;
}
return 0;
*/
2020-08-16 11:10:43 +02:00
int rc = 0;
{
TestBlocksDB test;
rc = QTest::qExec(&test);
}
if (!rc) {
2021-03-05 19:10:51 +01:00
TestMetaBlock test;
2020-08-16 11:10:43 +02:00
rc = QTest::qExec(&test);
}
2022-02-22 17:05:55 +01:00
if (!rc) {
TestAddrMan test;
rc = QTest::qExec(&test);
}
if (!rc) {
TestUnivalue test;
rc = QTest::qExec(&test);
}
2022-12-11 20:05:46 +01:00
if (!rc) {
Base58Tests test;
rc = QTest::qExec(&test);
}
2021-03-05 19:10:51 +01:00
2020-08-16 11:10:43 +02:00
return rc;
}