From 65b80e76b722e099f8696cb374d293bf9c3e446d Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 29 Mar 2021 11:52:51 +0200 Subject: [PATCH] Merge #21531: test: remove qt byteswap compattests 9ac86bcc0d72cdcecdbf8884a557095bbc3cdc11 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 ACK 9ac86bcc0d72cdcecdbf8884a557095bbc3cdc11 Tree-SHA512: 72ba131a5f8fbd9fdbbc4e1f95baa794496c960b12e0271700c632c6511b7e1b331e8db07a201838b4d56b2aeeb43d4de4e10265ea07ab14241307fa14d3342e --- src/Makefile.qttest.include | 3 --- src/qt/test/compattests.cpp | 25 ------------------------- src/qt/test/compattests.h | 19 ------------------- src/qt/test/test_main.cpp | 5 ----- src/test/bswap_tests.cpp | 1 - 5 files changed, 53 deletions(-) delete mode 100644 src/qt/test/compattests.cpp delete mode 100644 src/qt/test/compattests.h diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include index 3a89063c29..94aaaeaee0 100644 --- a/src/Makefile.qttest.include +++ b/src/Makefile.qttest.include @@ -8,7 +8,6 @@ TESTS += qt/test/test_dash-qt TEST_QT_MOC_CPP = \ qt/test/moc_apptests.cpp \ - qt/test/moc_compattests.cpp \ qt/test/moc_rpcnestedtests.cpp \ qt/test/moc_trafficgraphdatatests.cpp \ qt/test/moc_uritests.cpp @@ -22,7 +21,6 @@ endif # ENABLE_WALLET TEST_QT_H = \ qt/test/addressbooktests.h \ qt/test/apptests.h \ - qt/test/compattests.h \ qt/test/rpcnestedtests.h \ qt/test/uritests.h \ qt/test/util.h \ @@ -34,7 +32,6 @@ qt_test_test_dash_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_ qt_test_test_dash_qt_SOURCES = \ qt/test/apptests.cpp \ - qt/test/compattests.cpp \ qt/test/rpcnestedtests.cpp \ qt/test/test_main.cpp \ qt/test/trafficgraphdatatests.cpp \ diff --git a/src/qt/test/compattests.cpp b/src/qt/test/compattests.cpp deleted file mode 100644 index c76dee5091..0000000000 --- a/src/qt/test/compattests.cpp +++ /dev/null @@ -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 -#endif - -#include - -#include - -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); -} diff --git a/src/qt/test/compattests.h b/src/qt/test/compattests.h deleted file mode 100644 index 35dede7743..0000000000 --- a/src/qt/test/compattests.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2009-2015 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 -#include - -class CompatTests : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void bswapTests(); -}; - -#endif // BITCOIN_QT_TEST_COMPATTESTS_H diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index ab918383b9..b9a91f0fb6 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -92,10 +91,6 @@ int main(int argc, char* argv[]) if (QTest::qExec(&test3) != 0) { fInvalid = true; } - CompatTests test4; - if (QTest::qExec(&test4) != 0) { - fInvalid = true; - } #ifdef ENABLE_WALLET WalletTests test5(app.node()); if (QTest::qExec(&test5) != 0) { diff --git a/src/test/bswap_tests.cpp b/src/test/bswap_tests.cpp index fbcc8690dd..4e75e74d77 100644 --- a/src/test/bswap_tests.cpp +++ b/src/test/bswap_tests.cpp @@ -10,7 +10,6 @@ BOOST_AUTO_TEST_SUITE(bswap_tests) BOOST_AUTO_TEST_CASE(bswap_tests) { - // Sibling in bitcoin/src/qt/test/compattests.cpp uint16_t u1 = 0x1234; uint32_t u2 = 0x56789abc; uint64_t u3 = 0xdef0123456789abc;