Skip to content

Commit

Permalink
scripted-diff: Sort test includes
Browse files Browse the repository at this point in the history
-BEGIN VERIFY SCRIPT-
 # Mark all lines with #includes
 sed -i --regexp-extended -e 's/(#include <.*>)/\1 /g' $(git grep -l '#include' ./src/bench/ ./src/test ./src/wallet/test/)
 # Sort all marked lines
 git diff -U0 | ./contrib/devtools/clang-format-diff.py -p1 -i -v
-END VERIFY SCRIPT-
  • Loading branch information
MarcoFalke committed Apr 16, 2020
1 parent d8dfcea commit fac5c37
Show file tree
Hide file tree
Showing 59 changed files with 112 additions and 113 deletions.
2 changes: 1 addition & 1 deletion src/bench/bech32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <bech32.h>
#include <util/strencodings.h>

#include <vector>
#include <string>
#include <vector>


static void Bech32Encode(benchmark::State& state)
Expand Down
2 changes: 1 addition & 1 deletion src/bench/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#ifndef BITCOIN_BENCH_BENCH_H
#define BITCOIN_BENCH_BENCH_H

#include <chrono>
#include <functional>
#include <map>
#include <string>
#include <vector>
#include <chrono>

#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/stringize.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/bench/chacha_poly_aead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <crypto/poly1305.h> // for the POLY1305_TAGLEN constant
#include <hash.h>

#include <limits>
#include <assert.h>
#include <limits>

/* Number of bytes to process per iteration */
static constexpr uint64_t BUFFER_SIZE_TINY = 64;
Expand Down
4 changes: 2 additions & 2 deletions src/bench/checkblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <bench/data.h>

#include <chainparams.h>
#include <validation.h>
#include <streams.h>
#include <consensus/validation.h>
#include <streams.h>
#include <validation.h>

// These are the two major time-sinks which happen after we have fully received
// a block off the wire, but before we can relay the block on to peers using
Expand Down
6 changes: 3 additions & 3 deletions src/bench/checkqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <bench/bench.h>
#include <util/system.h>
#include <boost/thread/thread.hpp>
#include <checkqueue.h>
#include <prevector.h>
#include <vector>
#include <boost/thread/thread.hpp>
#include <random.h>
#include <util/system.h>
#include <vector>


static const int MIN_CORES = 2;
Expand Down
6 changes: 3 additions & 3 deletions src/bench/crypto_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@


#include <bench/bench.h>
#include <hash.h>
#include <random.h>
#include <uint256.h>
#include <crypto/ripemd160.h>
#include <crypto/sha1.h>
#include <crypto/sha256.h>
#include <crypto/sha512.h>
#include <crypto/siphash.h>
#include <hash.h>
#include <random.h>
#include <uint256.h>

/* Number of bytes to hash per iteration */
static const uint64_t BUFFER_SIZE = 1000*1000;
Expand Down
1 change: 0 additions & 1 deletion src/bench/duplicate_inputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <validation.h>



static void DuplicateInputs(benchmark::State& state)
{
const CScript SCRIPT_PUB{CScript(OP_TRUE)};
Expand Down
4 changes: 2 additions & 2 deletions src/bench/merkle_root.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#include <bench/bench.h>

#include <uint256.h>
#include <random.h>
#include <consensus/merkle.h>
#include <random.h>
#include <uint256.h>

static void MerkleRoot(benchmark::State& state)
{
Expand Down
4 changes: 2 additions & 2 deletions src/bench/rpc_blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include <bench/bench.h>
#include <bench/data.h>

#include <validation.h>
#include <streams.h>
#include <rpc/blockchain.h>
#include <streams.h>
#include <validation.h>

#include <univalue.h>

Expand Down
6 changes: 3 additions & 3 deletions src/test/addrman_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <addrman.h>
#include <test/util/setup_common.h>
#include <string>
#include <boost/test/unit_test.hpp>
#include <string>
#include <test/data/asmap.raw.h>
#include <test/util/setup_common.h>
#include <util/asmap.h>
#include <util/string.h>
#include <test/data/asmap.raw.h>

#include <hash.h>
#include <netbase.h>
Expand Down
10 changes: 5 additions & 5 deletions src/test/arith_uint256_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <arith_uint256.h>
#include <boost/test/unit_test.hpp>
#include <stdint.h>
#include <sstream>
#include <cmath>
#include <iomanip>
#include <limits>
#include <cmath>
#include <uint256.h>
#include <arith_uint256.h>
#include <sstream>
#include <stdint.h>
#include <string>
#include <test/util/setup_common.h>
#include <uint256.h>

BOOST_FIXTURE_TEST_SUITE(arith_uint256_tests, BasicTestingSetup)

Expand Down
2 changes: 1 addition & 1 deletion src/test/base32_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <util/strencodings.h>
#include <test/util/setup_common.h>
#include <util/strencodings.h>

#include <boost/test/unit_test.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/test/base64_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <util/strencodings.h>
#include <test/util/setup_common.h>
#include <util/strencodings.h>

#include <boost/test/unit_test.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/test/bip32_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <key.h>
#include <key_io.h>
#include <streams.h>
#include <util/strencodings.h>
#include <test/util/setup_common.h>
#include <util/strencodings.h>

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/test/blockchain_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include <chain.h>
#include <rpc/blockchain.h>
#include <util/string.h>
#include <test/util/setup_common.h>
#include <util/string.h>

/* Equality between doubles is imprecise. Comparison should be done
* with a small threshold of tolerance, rather than exact equality.
Expand Down
4 changes: 2 additions & 2 deletions src/test/bloom_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include <random.h>
#include <serialize.h>
#include <streams.h>
#include <test/util/setup_common.h>
#include <uint256.h>
#include <util/system.h>
#include <util/strencodings.h>
#include <test/util/setup_common.h>
#include <util/system.h>

#include <vector>

Expand Down
10 changes: 5 additions & 5 deletions src/test/checkqueue_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
#include <util/system.h>
#include <util/time.h>

#include <test/util/setup_common.h>
#include <checkqueue.h>
#include <atomic>
#include <boost/test/unit_test.hpp>
#include <boost/thread.hpp>
#include <atomic>
#include <checkqueue.h>
#include <condition_variable>
#include <mutex>
#include <test/util/setup_common.h>
#include <thread>
#include <vector>
#include <mutex>
#include <condition_variable>

#include <unordered_set>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion src/test/compilerbug_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <test/util/setup_common.h>
#include <boost/test/unit_test.hpp>
#include <test/util/setup_common.h>

BOOST_FIXTURE_TEST_SUITE(compilerbug_tests, BasicTestingSetup)

Expand Down
2 changes: 1 addition & 1 deletion src/test/compress_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <compressor.h>
#include <test/util/setup_common.h>
#include <script/standard.h>
#include <test/util/setup_common.h>

#include <stdint.h>

Expand Down
4 changes: 2 additions & 2 deletions src/test/crypto_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
#include <crypto/aes.h>
#include <crypto/chacha20.h>
#include <crypto/chacha_poly_aead.h>
#include <crypto/poly1305.h>
#include <crypto/hkdf_sha256_32.h>
#include <crypto/hmac_sha256.h>
#include <crypto/hmac_sha512.h>
#include <crypto/poly1305.h>
#include <crypto/ripemd160.h>
#include <crypto/sha1.h>
#include <crypto/sha256.h>
#include <crypto/sha512.h>
#include <random.h>
#include <util/strencodings.h>
#include <test/util/setup_common.h>
#include <util/strencodings.h>

#include <vector>

Expand Down
4 changes: 2 additions & 2 deletions src/test/cuckoocache_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/test/unit_test.hpp>
#include <cuckoocache.h>
#include <deque>
#include <random.h>
#include <script/sigcache.h>
#include <test/util/setup_common.h>
#include <random.h>
#include <thread>
#include <deque>

/** Test Suite for CuckooCache
*
Expand Down
2 changes: 1 addition & 1 deletion src/test/dbwrapper_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <dbwrapper.h>
#include <uint256.h>
#include <test/util/setup_common.h>
#include <uint256.h>
#include <util/memory.h>

#include <memory>
Expand Down
8 changes: 4 additions & 4 deletions src/test/descriptor_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <vector>
#include <string>
#include <boost/test/unit_test.hpp>
#include <script/descriptor.h>
#include <script/sign.h>
#include <script/standard.h>
#include <string>
#include <test/util/setup_common.h>
#include <boost/test/unit_test.hpp>
#include <script/descriptor.h>
#include <util/strencodings.h>
#include <vector>

namespace {

Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/base_encode_decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <base58.h>
#include <psbt.h>
#include <util/string.h>
#include <util/strencodings.h>
#include <util/string.h>

#include <cassert>
#include <cstdint>
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <consensus/validation.h>
#include <core_io.h>
#include <core_memusage.h>
#include <pubkey.h>
#include <primitives/block.h>
#include <pubkey.h>
#include <streams.h>
#include <test/fuzz/fuzz.h>
#include <validation.h>
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/eval_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <pubkey.h>
#include <script/interpreter.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <util/memory.h>

#include <limits>
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/hex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <core_io.h>
#include <pubkey.h>
#include <primitives/block.h>
#include <pubkey.h>
#include <rpc/util.h>
#include <test/fuzz/fuzz.h>
#include <uint256.h>
Expand Down
4 changes: 2 additions & 2 deletions src/test/fuzz/prevector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <test/fuzz/fuzz.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>

#include <vector>
#include <prevector.h>
#include <vector>

#include <reverse_iterator.h>
#include <serialize.h>
Expand Down
2 changes: 1 addition & 1 deletion src/test/getarg_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <test/util/setup_common.h>
#include <util/strencodings.h>
#include <util/system.h>
#include <test/util/setup_common.h>

#include <string>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion src/test/hash_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <clientversion.h>
#include <crypto/siphash.h>
#include <hash.h>
#include <util/strencodings.h>
#include <test/util/setup_common.h>
#include <util/strencodings.h>

#include <boost/test/unit_test.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/test/key_io_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <key.h>
#include <key_io.h>
#include <script/script.h>
#include <util/strencodings.h>
#include <test/util/setup_common.h>
#include <util/strencodings.h>

#include <boost/test/unit_test.hpp>

Expand Down
Loading

0 comments on commit fac5c37

Please sign in to comment.