aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorkenshi84 <kenshi84@protonmail.ch>2017-01-27 00:07:23 +0900
committerkenshi84 <kenshi84@protonmail.ch>2017-02-08 22:45:15 +0900
commit8027ce0c75f882de0523e668defa0bc3c8564e96 (patch)
tree40066ffa7c7afb28907291c93863d8cfdb14920c /tests
parentMerge pull request #1679 (diff)
downloadmonero-8027ce0c75f882de0523e668defa0bc3c8564e96.tar.xz
extract some basic code from libcryptonote_core into libcryptonote_basic
Diffstat (limited to 'tests')
-rw-r--r--tests/core_proxy/core_proxy.h4
-rw-r--r--tests/core_tests/chaingen.cpp8
-rw-r--r--tests/core_tests/chaingen.h10
-rw-r--r--tests/core_tests/chaingen001.cpp4
-rw-r--r--tests/core_tests/transaction_tests.cpp6
-rw-r--r--tests/daemon_tests/transfers.cpp2
-rw-r--r--tests/difficulty/difficulty.cpp2
-rw-r--r--tests/hash-target.cpp2
-rw-r--r--tests/performance_tests/check_tx_signature.h6
-rw-r--r--tests/performance_tests/cn_slow_hash.h2
-rw-r--r--tests/performance_tests/construct_tx.h6
-rw-r--r--tests/performance_tests/derive_public_key.h2
-rw-r--r--tests/performance_tests/derive_secret_key.h2
-rw-r--r--tests/performance_tests/ge_frombytes_vartime.h2
-rw-r--r--tests/performance_tests/generate_key_derivation.h2
-rw-r--r--tests/performance_tests/generate_key_image.h2
-rw-r--r--tests/performance_tests/generate_key_image_helper.h6
-rw-r--r--tests/performance_tests/generate_keypair.h2
-rw-r--r--tests/performance_tests/is_out_to_acc.h6
-rw-r--r--tests/performance_tests/multi_tx_test_base.h6
-rw-r--r--tests/performance_tests/single_tx_test_base.h6
-rw-r--r--tests/unit_tests/CMakeLists.txt2
-rw-r--r--tests/unit_tests/base58.cpp2
-rw-r--r--tests/unit_tests/block_reward.cpp2
-rw-r--r--tests/unit_tests/blockchain_db.cpp2
-rw-r--r--tests/unit_tests/canonical_amounts.cpp2
-rw-r--r--tests/unit_tests/checkpoints.cpp2
-rw-r--r--tests/unit_tests/decompose_amount_into_digits.cpp2
-rw-r--r--tests/unit_tests/hardfork.cpp2
-rw-r--r--tests/unit_tests/parse_amount.cpp2
-rw-r--r--tests/unit_tests/serialization.cpp4
-rw-r--r--tests/unit_tests/test_tx_utils.cpp (renamed from tests/unit_tests/test_format_utils.cpp)2
-rw-r--r--tests/unit_tests/varint.cpp4
33 files changed, 58 insertions, 58 deletions
diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h
index bec9a83bb..c649f51cc 100644
--- a/tests/core_proxy/core_proxy.h
+++ b/tests/core_proxy/core_proxy.h
@@ -32,8 +32,8 @@
#include <boost/program_options/variables_map.hpp>
-#include "cryptonote_core/cryptonote_basic_impl.h"
-#include "cryptonote_core/verification_context.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
+#include "cryptonote_basic/verification_context.h"
#include <unordered_map>
namespace tests
diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp
index 4cb70e745..53d0872dd 100644
--- a/tests/core_tests/chaingen.cpp
+++ b/tests/core_tests/chaingen.cpp
@@ -37,10 +37,10 @@
#include "console_handler.h"
#include "p2p/net_node.h"
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_basic_impl.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
-#include "cryptonote_core/miner.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
+#include "cryptonote_basic/miner.h"
#include "chaingen.h"
diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h
index 04f910efc..4b0ed1355 100644
--- a/tests/core_tests/chaingen.h
+++ b/tests/core_tests/chaingen.h
@@ -44,12 +44,12 @@
#include "common/boost_serialization_helper.h"
#include "common/command_line.h"
-#include "cryptonote_core/account_boost_serialization.h"
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_basic_impl.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/account_boost_serialization.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
#include "cryptonote_core/cryptonote_core.h"
-#include "cryptonote_core/cryptonote_boost_serialization.h"
+#include "cryptonote_basic/cryptonote_boost_serialization.h"
#include "misc_language.h"
#undef MONERO_DEFAULT_LOG_CATEGORY
diff --git a/tests/core_tests/chaingen001.cpp b/tests/core_tests/chaingen001.cpp
index f5150f2f7..9abd97185 100644
--- a/tests/core_tests/chaingen001.cpp
+++ b/tests/core_tests/chaingen001.cpp
@@ -35,8 +35,8 @@
#include "console_handler.h"
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
#include "chaingen.h"
#include "chaingen_tests_list.h"
diff --git a/tests/core_tests/transaction_tests.cpp b/tests/core_tests/transaction_tests.cpp
index cb585b975..b4af597e9 100644
--- a/tests/core_tests/transaction_tests.cpp
+++ b/tests/core_tests/transaction_tests.cpp
@@ -29,9 +29,9 @@
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
#include "include_base_utils.h"
-#include "cryptonote_core/cryptonote_basic_impl.h"
-#include "cryptonote_core/account.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
+#include "cryptonote_basic/account.h"
+#include "cryptonote_core/cryptonote_tx_utils.h"
#include "misc_language.h"
using namespace cryptonote;
diff --git a/tests/daemon_tests/transfers.cpp b/tests/daemon_tests/transfers.cpp
index ea851c541..398fdefe9 100644
--- a/tests/daemon_tests/transfers.cpp
+++ b/tests/daemon_tests/transfers.cpp
@@ -32,7 +32,7 @@
#include <sstream>
#include "wallet/wallet.h"
#include "rpc/core_rpc_server.h"
-#include "cryptonote_core/account.h"
+#include "cryptonote_basic/account.h"
#include "net/http_client_abstract_invoke.h"
using namespace std;
using namespace epee::misc_utils;
diff --git a/tests/difficulty/difficulty.cpp b/tests/difficulty/difficulty.cpp
index edfce46ab..d4c8e94c8 100644
--- a/tests/difficulty/difficulty.cpp
+++ b/tests/difficulty/difficulty.cpp
@@ -36,7 +36,7 @@
#include <algorithm>
#include "cryptonote_config.h"
-#include "cryptonote_core/difficulty.h"
+#include "cryptonote_basic/difficulty.h"
using namespace std;
diff --git a/tests/hash-target.cpp b/tests/hash-target.cpp
index aeb6688bc..de3a8df2c 100644
--- a/tests/hash-target.cpp
+++ b/tests/hash-target.cpp
@@ -33,7 +33,7 @@
#include <cstring>
#include <limits>
#include "crypto/hash.h"
-#include "cryptonote_core/difficulty.h"
+#include "cryptonote_basic/difficulty.h"
using namespace std;
using cryptonote::check_hash;
diff --git a/tests/performance_tests/check_tx_signature.h b/tests/performance_tests/check_tx_signature.h
index fe595a4da..b2b2f4004 100644
--- a/tests/performance_tests/check_tx_signature.h
+++ b/tests/performance_tests/check_tx_signature.h
@@ -32,9 +32,9 @@
#include <vector>
-#include "cryptonote_core/account.h"
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/account.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_core/cryptonote_tx_utils.h"
#include "crypto/crypto.h"
#include "ringct/rctSigs.h"
diff --git a/tests/performance_tests/cn_slow_hash.h b/tests/performance_tests/cn_slow_hash.h
index 5492299cd..b646e5121 100644
--- a/tests/performance_tests/cn_slow_hash.h
+++ b/tests/performance_tests/cn_slow_hash.h
@@ -31,7 +31,7 @@
#pragma once
#include "crypto/crypto.h"
-#include "cryptonote_core/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic.h"
class test_cn_slow_hash
{
diff --git a/tests/performance_tests/construct_tx.h b/tests/performance_tests/construct_tx.h
index aef455eaa..2fe6d288d 100644
--- a/tests/performance_tests/construct_tx.h
+++ b/tests/performance_tests/construct_tx.h
@@ -30,9 +30,9 @@
#pragma once
-#include "cryptonote_core/account.h"
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/account.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_core/cryptonote_tx_utils.h"
#include "multi_tx_test_base.h"
diff --git a/tests/performance_tests/derive_public_key.h b/tests/performance_tests/derive_public_key.h
index 727dde000..559745ef9 100644
--- a/tests/performance_tests/derive_public_key.h
+++ b/tests/performance_tests/derive_public_key.h
@@ -31,7 +31,7 @@
#pragma once
#include "crypto/crypto.h"
-#include "cryptonote_core/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic.h"
#include "single_tx_test_base.h"
diff --git a/tests/performance_tests/derive_secret_key.h b/tests/performance_tests/derive_secret_key.h
index 94df93843..c7aed162e 100644
--- a/tests/performance_tests/derive_secret_key.h
+++ b/tests/performance_tests/derive_secret_key.h
@@ -31,7 +31,7 @@
#pragma once
#include "crypto/crypto.h"
-#include "cryptonote_core/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic.h"
#include "single_tx_test_base.h"
diff --git a/tests/performance_tests/ge_frombytes_vartime.h b/tests/performance_tests/ge_frombytes_vartime.h
index c815422f9..bf1785ab4 100644
--- a/tests/performance_tests/ge_frombytes_vartime.h
+++ b/tests/performance_tests/ge_frombytes_vartime.h
@@ -31,7 +31,7 @@
#pragma once
#include "crypto/crypto.h"
-#include "cryptonote_core/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic.h"
#include "single_tx_test_base.h"
diff --git a/tests/performance_tests/generate_key_derivation.h b/tests/performance_tests/generate_key_derivation.h
index 35f41ef89..3e6481bda 100644
--- a/tests/performance_tests/generate_key_derivation.h
+++ b/tests/performance_tests/generate_key_derivation.h
@@ -31,7 +31,7 @@
#pragma once
#include "crypto/crypto.h"
-#include "cryptonote_core/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic.h"
#include "single_tx_test_base.h"
diff --git a/tests/performance_tests/generate_key_image.h b/tests/performance_tests/generate_key_image.h
index fee987969..4a5fbb946 100644
--- a/tests/performance_tests/generate_key_image.h
+++ b/tests/performance_tests/generate_key_image.h
@@ -31,7 +31,7 @@
#pragma once
#include "crypto/crypto.h"
-#include "cryptonote_core/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic.h"
#include "single_tx_test_base.h"
diff --git a/tests/performance_tests/generate_key_image_helper.h b/tests/performance_tests/generate_key_image_helper.h
index 44f5c9d12..66c9a244b 100644
--- a/tests/performance_tests/generate_key_image_helper.h
+++ b/tests/performance_tests/generate_key_image_helper.h
@@ -30,9 +30,9 @@
#pragma once
-#include "cryptonote_core/account.h"
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/account.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
#include "single_tx_test_base.h"
diff --git a/tests/performance_tests/generate_keypair.h b/tests/performance_tests/generate_keypair.h
index 4ba577e2a..4f9179318 100644
--- a/tests/performance_tests/generate_keypair.h
+++ b/tests/performance_tests/generate_keypair.h
@@ -31,7 +31,7 @@
#pragma once
#include "crypto/crypto.h"
-#include "cryptonote_core/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic.h"
class test_generate_keypair
{
diff --git a/tests/performance_tests/is_out_to_acc.h b/tests/performance_tests/is_out_to_acc.h
index 7f8645b87..6c7adfa51 100644
--- a/tests/performance_tests/is_out_to_acc.h
+++ b/tests/performance_tests/is_out_to_acc.h
@@ -30,9 +30,9 @@
#pragma once
-#include "cryptonote_core/account.h"
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/account.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_core/cryptonote_tx_utils.h"
#include "single_tx_test_base.h"
diff --git a/tests/performance_tests/multi_tx_test_base.h b/tests/performance_tests/multi_tx_test_base.h
index feabab022..ef5d277f1 100644
--- a/tests/performance_tests/multi_tx_test_base.h
+++ b/tests/performance_tests/multi_tx_test_base.h
@@ -32,9 +32,9 @@
#include <vector>
-#include "cryptonote_core/account.h"
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/account.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_core/cryptonote_tx_utils.h"
#include "crypto/crypto.h"
template<size_t a_ring_size>
diff --git a/tests/performance_tests/single_tx_test_base.h b/tests/performance_tests/single_tx_test_base.h
index c667b71b7..3d3f81bc7 100644
--- a/tests/performance_tests/single_tx_test_base.h
+++ b/tests/performance_tests/single_tx_test_base.h
@@ -30,9 +30,9 @@
#pragma once
-#include "cryptonote_core/account.h"
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/account.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_core/cryptonote_tx_utils.h"
class single_tx_test_base
{
diff --git a/tests/unit_tests/CMakeLists.txt b/tests/unit_tests/CMakeLists.txt
index 08c8213e4..5db4e2ad5 100644
--- a/tests/unit_tests/CMakeLists.txt
+++ b/tests/unit_tests/CMakeLists.txt
@@ -49,7 +49,7 @@ set(unit_tests_sources
parse_amount.cpp
serialization.cpp
slow_memmem.cpp
- test_format_utils.cpp
+ test_tx_utils.cpp
test_peerlist.cpp
test_protocol_pack.cpp
thread_group.cpp
diff --git a/tests/unit_tests/base58.cpp b/tests/unit_tests/base58.cpp
index 53f7f2673..d2c767956 100644
--- a/tests/unit_tests/base58.cpp
+++ b/tests/unit_tests/base58.cpp
@@ -33,7 +33,7 @@
#include <cstdint>
#include "common/base58.cpp"
-#include "cryptonote_core/cryptonote_basic_impl.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
#include "serialization/binary_utils.h"
using namespace tools;
diff --git a/tests/unit_tests/block_reward.cpp b/tests/unit_tests/block_reward.cpp
index 5d93c3084..f8a944770 100644
--- a/tests/unit_tests/block_reward.cpp
+++ b/tests/unit_tests/block_reward.cpp
@@ -30,7 +30,7 @@
#include "gtest/gtest.h"
-#include "cryptonote_core/cryptonote_basic_impl.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
using namespace cryptonote;
diff --git a/tests/unit_tests/blockchain_db.cpp b/tests/unit_tests/blockchain_db.cpp
index 127a15b44..8fc10be10 100644
--- a/tests/unit_tests/blockchain_db.cpp
+++ b/tests/unit_tests/blockchain_db.cpp
@@ -40,7 +40,7 @@
#ifdef BERKELEY_DB
#include "blockchain_db/berkeleydb/db_bdb.h"
#endif
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
using namespace cryptonote;
using epee::string_tools::pod_to_hex;
diff --git a/tests/unit_tests/canonical_amounts.cpp b/tests/unit_tests/canonical_amounts.cpp
index 9bef58d4b..c5a27d47d 100644
--- a/tests/unit_tests/canonical_amounts.cpp
+++ b/tests/unit_tests/canonical_amounts.cpp
@@ -29,7 +29,7 @@
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
#include "gtest/gtest.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
static const uint64_t valid_decomposed_outputs[] = {
(uint64_t)1, (uint64_t)2, (uint64_t)3, (uint64_t)4, (uint64_t)5, (uint64_t)6, (uint64_t)7, (uint64_t)8, (uint64_t)9, // 1 piconero
diff --git a/tests/unit_tests/checkpoints.cpp b/tests/unit_tests/checkpoints.cpp
index b1d251d26..bc18c2b9e 100644
--- a/tests/unit_tests/checkpoints.cpp
+++ b/tests/unit_tests/checkpoints.cpp
@@ -30,7 +30,7 @@
#include "gtest/gtest.h"
-#include "cryptonote_core/checkpoints.cpp"
+#include "cryptonote_basic/checkpoints.cpp"
using namespace cryptonote;
diff --git a/tests/unit_tests/decompose_amount_into_digits.cpp b/tests/unit_tests/decompose_amount_into_digits.cpp
index e40208113..b1fa79aa1 100644
--- a/tests/unit_tests/decompose_amount_into_digits.cpp
+++ b/tests/unit_tests/decompose_amount_into_digits.cpp
@@ -33,7 +33,7 @@
#include <cstdint>
#include <vector>
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
#define VEC_FROM_ARR(vec) \
std::vector<uint64_t> vec; \
diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp
index 2682f15d3..81cf32c8b 100644
--- a/tests/unit_tests/hardfork.cpp
+++ b/tests/unit_tests/hardfork.cpp
@@ -32,7 +32,7 @@
#include "gtest/gtest.h"
#include "blockchain_db/lmdb/db_lmdb.h"
-#include "cryptonote_core/hardfork.h"
+#include "cryptonote_basic/hardfork.h"
using namespace cryptonote;
diff --git a/tests/unit_tests/parse_amount.cpp b/tests/unit_tests/parse_amount.cpp
index 6c61d63f1..23e7eb292 100644
--- a/tests/unit_tests/parse_amount.cpp
+++ b/tests/unit_tests/parse_amount.cpp
@@ -30,7 +30,7 @@
#include "gtest/gtest.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
using namespace cryptonote;
diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp
index 1083dd4cc..5b8486a19 100644
--- a/tests/unit_tests/serialization.cpp
+++ b/tests/unit_tests/serialization.cpp
@@ -35,8 +35,8 @@
#include <vector>
#include <boost/foreach.hpp>
#include <boost/archive/portable_binary_iarchive.hpp>
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_basic_impl.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
#include "ringct/rctSigs.h"
#include "serialization/serialization.h"
#include "serialization/binary_archive.h"
diff --git a/tests/unit_tests/test_format_utils.cpp b/tests/unit_tests/test_tx_utils.cpp
index 463d62529..91d5d5d67 100644
--- a/tests/unit_tests/test_format_utils.cpp
+++ b/tests/unit_tests/test_tx_utils.cpp
@@ -33,7 +33,7 @@
#include <vector>
#include "common/util.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_core/cryptonote_tx_utils.h"
namespace
{
diff --git a/tests/unit_tests/varint.cpp b/tests/unit_tests/varint.cpp
index a483cbd5f..a87eeb14b 100644
--- a/tests/unit_tests/varint.cpp
+++ b/tests/unit_tests/varint.cpp
@@ -34,8 +34,8 @@
#include <iostream>
#include <vector>
#include <boost/foreach.hpp>
-#include "cryptonote_core/cryptonote_basic.h"
-#include "cryptonote_core/cryptonote_basic_impl.h"
+#include "cryptonote_basic/cryptonote_basic.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
#include "serialization/serialization.h"
#include "serialization/binary_archive.h"
#include "serialization/json_archive.h"