Files
thehub/testing/hub/base58_tests.h
tomFlowee b5b493542b Rework base58 and tests
The unit tests testing base58 encoding were using univalue JSON
parsing, since we deprecatd univalue to be a hub-private lib
this has now been ported to Qts JSON parser.
Which also makes the clunky cmake hack nice to replace with the
QRC files concept.

As I was in there anyway, the base58 methods being global scope
C-style methods has now been fixed by putting them in a namespace.
2022-12-13 11:34:54 +01:00

40 lines
1.3 KiB
C++

/*
* This file is part of the Flowee project
* Copyright (C) 2011-2015 The Bitcoin Core developers
* Copyright (C) 2022 Tom Zander <tom@flowee.org>
*
* 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/>.
*/
#ifndef BASE58_H
#define BASE58_H
#include <common/TestFloweeBase.h>
// Goal: check that parsed keys match test payload
class Base58Tests : public TestFloweeBase
{
Q_OBJECT
private slots:
// Goal: check that parsed keys match test payload
void base58KeysValidParse();
// Goal: check that generated keys match test vectors
void base58KeysValidGen();
// Goal: check that base58 parsing code is robust against a variety of corrupted data
void base58KeysInvalid();
};
#endif