diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-08-21 16:11:09 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-08-26 13:25:22 +0200 |
| commit | ad49c256c33bfe4088fd3c7ecb7d28cb81a8fc70 (patch) | |
| tree | c4152c73cf6a424a882a125fa89c59ee6869bb86 /src/test | |
| parent | Move `COIN` and `CENT` to core.h (diff) | |
| download | discoin-ad49c256c33bfe4088fd3c7ecb7d28cb81a8fc70.tar.xz discoin-ad49c256c33bfe4088fd3c7ecb7d28cb81a8fc70.zip | |
Split up util.cpp/h
Split up util.cpp/h into:
- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)
The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).
Breaks dependency of sha256.cpp on all the things pulled in by util.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/DoS_tests.cpp | 1 | ||||
| -rw-r--r-- | src/test/alert_tests.cpp | 1 | ||||
| -rw-r--r-- | src/test/allocator_tests.cpp | 2 | ||||
| -rw-r--r-- | src/test/base32_tests.cpp | 2 | ||||
| -rw-r--r-- | src/test/base64_tests.cpp | 2 | ||||
| -rw-r--r-- | src/test/checkblock_tests.cpp | 1 | ||||
| -rw-r--r-- | src/test/crypto_tests.cpp | 2 | ||||
| -rw-r--r-- | src/test/hash_tests.cpp | 2 | ||||
| -rw-r--r-- | src/test/test_bitcoin.cpp | 1 | ||||
| -rw-r--r-- | src/test/util_tests.cpp | 3 |
10 files changed, 13 insertions, 4 deletions
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp index 5e17555e7..4ecf6e253 100644 --- a/src/test/DoS_tests.cpp +++ b/src/test/DoS_tests.cpp @@ -14,6 +14,7 @@ #include "pow.h" #include "script.h" #include "serialize.h" +#include "util.h" #include <stdint.h> diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp index e3066a51a..4af87cf8e 100644 --- a/src/test/alert_tests.cpp +++ b/src/test/alert_tests.cpp @@ -11,6 +11,7 @@ #include "serialize.h" #include "util.h" +#include "utilstrencodings.h" #include "version.h" #include <fstream> diff --git a/src/test/allocator_tests.cpp b/src/test/allocator_tests.cpp index 2752a0b21..69888da3d 100644 --- a/src/test/allocator_tests.cpp +++ b/src/test/allocator_tests.cpp @@ -4,6 +4,8 @@ #include "util.h" +#include "allocators.h" + #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(allocator_tests) diff --git a/src/test/base32_tests.cpp b/src/test/base32_tests.cpp index 87473585e..68617abbd 100644 --- a/src/test/base32_tests.cpp +++ b/src/test/base32_tests.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "util.h" +#include "utilstrencodings.h" #include <boost/test/unit_test.hpp> diff --git a/src/test/base64_tests.cpp b/src/test/base64_tests.cpp index d4a23d9aa..f2bf3326a 100644 --- a/src/test/base64_tests.cpp +++ b/src/test/base64_tests.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "util.h" +#include "utilstrencodings.h" #include <boost/test/unit_test.hpp> diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp index 10352240f..fdea12846 100644 --- a/src/test/checkblock_tests.cpp +++ b/src/test/checkblock_tests.cpp @@ -9,6 +9,7 @@ #include "main.h" +#include "utiltime.h" #include <cstdio> diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp index a17278b80..a3eec270e 100644 --- a/src/test/crypto_tests.cpp +++ b/src/test/crypto_tests.cpp @@ -6,7 +6,7 @@ #include "crypto/sha1.h" #include "crypto/sha2.h" #include "random.h" -#include "util.h" +#include "utilstrencodings.h" #include <vector> diff --git a/src/test/hash_tests.cpp b/src/test/hash_tests.cpp index 4568c8769..b8e290f07 100644 --- a/src/test/hash_tests.cpp +++ b/src/test/hash_tests.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "hash.h" -#include "util.h" +#include "utilstrencodings.h" #include <vector> diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 443b5853b..68fad8d03 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -16,6 +16,7 @@ #include <boost/filesystem.hpp> #include <boost/test/unit_test.hpp> +#include <boost/thread.hpp> CClientUIInterface uiInterface; CWallet* pwalletMain; diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 31fcd3e92..e077c9de3 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -4,8 +4,11 @@ #include "util.h" +#include "core.h" #include "random.h" #include "sync.h" +#include "utilstrencodings.h" +#include "utilmoneystr.h" #include <stdint.h> #include <vector> |