mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-25 11:31:16 +02:00
Merge #21531: test: remove qt byteswap compattests
9ac86bcc0d
test: remove qt byteswap compattests (fanquake) Pull request description: These were added as part of #9366 when with fixing issues with Protobuf. Now that we no-longer use Protobuf, there's no reason to maintain a duplicate set of byteswap tests in the qt tests. Our other set of byteswap tests are here: https://github.com/bitcoin/bitcoin/blob/master/src/test/bswap_tests.cpp. ACKs for top commit: laanwj: Code review ACK9ac86bcc0d
Tree-SHA512: 72ba131a5f8fbd9fdbbc4e1f95baa794496c960b12e0271700c632c6511b7e1b331e8db07a201838b4d56b2aeeb43d4de4e10265ea07ab14241307fa14d3342e
This commit is contained in:
@@ -11,7 +11,6 @@
|
|||||||
<ClCompile Include="..\..\src\test\util\setup_common.cpp" />
|
<ClCompile Include="..\..\src\test\util\setup_common.cpp" />
|
||||||
<ClCompile Include="..\..\src\qt\test\addressbooktests.cpp" />
|
<ClCompile Include="..\..\src\qt\test\addressbooktests.cpp" />
|
||||||
<ClCompile Include="..\..\src\qt\test\apptests.cpp" />
|
<ClCompile Include="..\..\src\qt\test\apptests.cpp" />
|
||||||
<ClCompile Include="..\..\src\qt\test\compattests.cpp" />
|
|
||||||
<ClCompile Include="..\..\src\qt\test\rpcnestedtests.cpp" />
|
<ClCompile Include="..\..\src\qt\test\rpcnestedtests.cpp" />
|
||||||
<ClCompile Include="..\..\src\qt\test\test_main.cpp" />
|
<ClCompile Include="..\..\src\qt\test\test_main.cpp" />
|
||||||
<ClCompile Include="..\..\src\qt\test\uritests.cpp" />
|
<ClCompile Include="..\..\src\qt\test\uritests.cpp" />
|
||||||
@@ -20,7 +19,6 @@
|
|||||||
<ClCompile Include="..\..\src\wallet\test\wallet_test_fixture.cpp" />
|
<ClCompile Include="..\..\src\wallet\test\wallet_test_fixture.cpp" />
|
||||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_addressbooktests.cpp" />
|
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_addressbooktests.cpp" />
|
||||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_apptests.cpp" />
|
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_apptests.cpp" />
|
||||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_compattests.cpp" />
|
|
||||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_rpcnestedtests.cpp" />
|
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_rpcnestedtests.cpp" />
|
||||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_uritests.cpp" />
|
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_uritests.cpp" />
|
||||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_wallettests.cpp" />
|
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_wallettests.cpp" />
|
||||||
@@ -89,7 +87,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<MocTestFiles Include="..\..\src\qt\test\addressbooktests.h" />
|
<MocTestFiles Include="..\..\src\qt\test\addressbooktests.h" />
|
||||||
<MocTestFiles Include="..\..\src\qt\test\apptests.h" />
|
<MocTestFiles Include="..\..\src\qt\test\apptests.h" />
|
||||||
<MocTestFiles Include="..\..\src\qt\test\compattests.h" />
|
|
||||||
<MocTestFiles Include="..\..\src\qt\test\rpcnestedtests.h" />
|
<MocTestFiles Include="..\..\src\qt\test\rpcnestedtests.h" />
|
||||||
<MocTestFiles Include="..\..\src\qt\test\uritests.h" />
|
<MocTestFiles Include="..\..\src\qt\test\uritests.h" />
|
||||||
<MocTestFiles Include="..\..\src\qt\test\wallettests.h" />
|
<MocTestFiles Include="..\..\src\qt\test\wallettests.h" />
|
||||||
|
@@ -7,7 +7,6 @@ TESTS += qt/test/test_bitcoin-qt
|
|||||||
|
|
||||||
TEST_QT_MOC_CPP = \
|
TEST_QT_MOC_CPP = \
|
||||||
qt/test/moc_apptests.cpp \
|
qt/test/moc_apptests.cpp \
|
||||||
qt/test/moc_compattests.cpp \
|
|
||||||
qt/test/moc_rpcnestedtests.cpp \
|
qt/test/moc_rpcnestedtests.cpp \
|
||||||
qt/test/moc_uritests.cpp
|
qt/test/moc_uritests.cpp
|
||||||
|
|
||||||
@@ -20,7 +19,6 @@ endif # ENABLE_WALLET
|
|||||||
TEST_QT_H = \
|
TEST_QT_H = \
|
||||||
qt/test/addressbooktests.h \
|
qt/test/addressbooktests.h \
|
||||||
qt/test/apptests.h \
|
qt/test/apptests.h \
|
||||||
qt/test/compattests.h \
|
|
||||||
qt/test/rpcnestedtests.h \
|
qt/test/rpcnestedtests.h \
|
||||||
qt/test/uritests.h \
|
qt/test/uritests.h \
|
||||||
qt/test/util.h \
|
qt/test/util.h \
|
||||||
@@ -31,7 +29,6 @@ qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_
|
|||||||
|
|
||||||
qt_test_test_bitcoin_qt_SOURCES = \
|
qt_test_test_bitcoin_qt_SOURCES = \
|
||||||
qt/test/apptests.cpp \
|
qt/test/apptests.cpp \
|
||||||
qt/test/compattests.cpp \
|
|
||||||
qt/test/rpcnestedtests.cpp \
|
qt/test/rpcnestedtests.cpp \
|
||||||
qt/test/test_main.cpp \
|
qt/test/test_main.cpp \
|
||||||
qt/test/uritests.cpp \
|
qt/test/uritests.cpp \
|
||||||
|
@@ -1,25 +0,0 @@
|
|||||||
// Copyright (c) 2016-2019 The Bitcoin Core developers
|
|
||||||
// Distributed under the MIT software license, see the accompanying
|
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||||
|
|
||||||
#if defined(HAVE_CONFIG_H)
|
|
||||||
#include <config/bitcoin-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <qt/test/compattests.h>
|
|
||||||
|
|
||||||
#include <compat/byteswap.h>
|
|
||||||
|
|
||||||
void CompatTests::bswapTests()
|
|
||||||
{
|
|
||||||
// Sibling in bitcoin/src/test/bswap_tests.cpp
|
|
||||||
uint16_t u1 = 0x1234;
|
|
||||||
uint32_t u2 = 0x56789abc;
|
|
||||||
uint64_t u3 = 0xdef0123456789abc;
|
|
||||||
uint16_t e1 = 0x3412;
|
|
||||||
uint32_t e2 = 0xbc9a7856;
|
|
||||||
uint64_t e3 = 0xbc9a78563412f0de;
|
|
||||||
QVERIFY(bswap_16(u1) == e1);
|
|
||||||
QVERIFY(bswap_32(u2) == e2);
|
|
||||||
QVERIFY(bswap_64(u3) == e3);
|
|
||||||
}
|
|
@@ -1,19 +0,0 @@
|
|||||||
// Copyright (c) 2009-2016 The Bitcoin Core developers
|
|
||||||
// Distributed under the MIT software license, see the accompanying
|
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||||
|
|
||||||
#ifndef BITCOIN_QT_TEST_COMPATTESTS_H
|
|
||||||
#define BITCOIN_QT_TEST_COMPATTESTS_H
|
|
||||||
|
|
||||||
#include <QObject>
|
|
||||||
#include <QTest>
|
|
||||||
|
|
||||||
class CompatTests : public QObject
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void bswapTests();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // BITCOIN_QT_TEST_COMPATTESTS_H
|
|
@@ -11,7 +11,6 @@
|
|||||||
#include <qt/test/apptests.h>
|
#include <qt/test/apptests.h>
|
||||||
#include <qt/test/rpcnestedtests.h>
|
#include <qt/test/rpcnestedtests.h>
|
||||||
#include <qt/test/uritests.h>
|
#include <qt/test/uritests.h>
|
||||||
#include <qt/test/compattests.h>
|
|
||||||
#include <test/util/setup_common.h>
|
#include <test/util/setup_common.h>
|
||||||
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
@@ -92,10 +91,6 @@ int main(int argc, char* argv[])
|
|||||||
if (QTest::qExec(&test3) != 0) {
|
if (QTest::qExec(&test3) != 0) {
|
||||||
fInvalid = true;
|
fInvalid = true;
|
||||||
}
|
}
|
||||||
CompatTests test4;
|
|
||||||
if (QTest::qExec(&test4) != 0) {
|
|
||||||
fInvalid = true;
|
|
||||||
}
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
WalletTests test5(app.node());
|
WalletTests test5(app.node());
|
||||||
if (QTest::qExec(&test5) != 0) {
|
if (QTest::qExec(&test5) != 0) {
|
||||||
|
@@ -11,7 +11,6 @@ BOOST_FIXTURE_TEST_SUITE(bswap_tests, BasicTestingSetup)
|
|||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(bswap_tests)
|
BOOST_AUTO_TEST_CASE(bswap_tests)
|
||||||
{
|
{
|
||||||
// Sibling in bitcoin/src/qt/test/compattests.cpp
|
|
||||||
uint16_t u1 = 0x1234;
|
uint16_t u1 = 0x1234;
|
||||||
uint32_t u2 = 0x56789abc;
|
uint32_t u2 = 0x56789abc;
|
||||||
uint64_t u3 = 0xdef0123456789abc;
|
uint64_t u3 = 0xdef0123456789abc;
|
||||||
|
Reference in New Issue
Block a user