diff options
Diffstat (limited to 'tests/core_tests')
-rw-r--r-- | tests/core_tests/CMakeLists.txt | 10 | ||||
-rw-r--r-- | tests/core_tests/block_reward.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/block_validation.cpp | 6 | ||||
-rw-r--r-- | tests/core_tests/chain_split_1.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/chain_switch_1.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/chaingen.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/double_spend.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/double_spend.inl | 2 | ||||
-rw-r--r-- | tests/core_tests/integer_overflow.cpp | 7 | ||||
-rw-r--r-- | tests/core_tests/rct.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/ring_signature_1.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/transaction_tests.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/tx_validation.cpp | 2 | ||||
-rw-r--r-- | tests/core_tests/v2_tests.cpp | 4 |
14 files changed, 22 insertions, 25 deletions
diff --git a/tests/core_tests/CMakeLists.txt b/tests/core_tests/CMakeLists.txt index a24bd4fce..68f2e9816 100644 --- a/tests/core_tests/CMakeLists.txt +++ b/tests/core_tests/CMakeLists.txt @@ -58,10 +58,10 @@ set(core_tests_headers v2_tests.h rct.h) -add_executable(coretests +add_executable(core_tests ${core_tests_sources} ${core_tests_headers}) -target_link_libraries(coretests +target_link_libraries(core_tests PRIVATE cryptonote_core p2p @@ -69,10 +69,10 @@ target_link_libraries(coretests epee ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_LIBRARIES}) -set_property(TARGET coretests +set_property(TARGET core_tests PROPERTY FOLDER "tests") add_test( - NAME coretests - COMMAND coretests --generate_and_play_test_data) + NAME core_tests + COMMAND core_tests --generate_and_play_test_data) diff --git a/tests/core_tests/block_reward.cpp b/tests/core_tests/block_reward.cpp index 9f3939652..8e68554d3 100644 --- a/tests/core_tests/block_reward.cpp +++ b/tests/core_tests/block_reward.cpp @@ -29,8 +29,6 @@ // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "chaingen.h" -#include "chaingen_tests_list.h" - #include "block_reward.h" using namespace epee; diff --git a/tests/core_tests/block_validation.cpp b/tests/core_tests/block_validation.cpp index 527059141..94b636f82 100644 --- a/tests/core_tests/block_validation.cpp +++ b/tests/core_tests/block_validation.cpp @@ -29,7 +29,7 @@ // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "chaingen.h" -#include "chaingen_tests_list.h" +#include "block_validation.h" using namespace epee; using namespace cryptonote; @@ -350,7 +350,7 @@ bool gen_block_miner_tx_has_2_in::generate(std::vector<test_event_entry>& events destinations.push_back(de); transaction tmp_tx; - if (!construct_tx(miner_account.get_keys(), sources, destinations, std::vector<uint8_t>(), tmp_tx, 0)) + if (!construct_tx(miner_account.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tmp_tx, 0)) return false; MAKE_MINER_TX_MANUALLY(miner_tx, blk_0); @@ -393,7 +393,7 @@ bool gen_block_miner_tx_with_txin_to_key::generate(std::vector<test_event_entry> destinations.push_back(de); transaction tmp_tx; - if (!construct_tx(miner_account.get_keys(), sources, destinations, std::vector<uint8_t>(), tmp_tx, 0)) + if (!construct_tx(miner_account.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tmp_tx, 0)) return false; MAKE_MINER_TX_MANUALLY(miner_tx, blk_1); diff --git a/tests/core_tests/chain_split_1.cpp b/tests/core_tests/chain_split_1.cpp index eaaa3e045..79aecb1c0 100644 --- a/tests/core_tests/chain_split_1.cpp +++ b/tests/core_tests/chain_split_1.cpp @@ -29,7 +29,7 @@ // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "chaingen.h" -#include "chaingen_tests_list.h" +#include "chain_split_1.h" using namespace std; diff --git a/tests/core_tests/chain_switch_1.cpp b/tests/core_tests/chain_switch_1.cpp index b04d05219..01cf00f7a 100644 --- a/tests/core_tests/chain_switch_1.cpp +++ b/tests/core_tests/chain_switch_1.cpp @@ -29,7 +29,7 @@ // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "chaingen.h" -#include "chaingen_tests_list.h" +#include "chain_switch_1.h" using namespace epee; using namespace cryptonote; diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp index f23aa8ecb..2b713cab9 100644 --- a/tests/core_tests/chaingen.cpp +++ b/tests/core_tests/chaingen.cpp @@ -563,7 +563,7 @@ bool construct_tx_to_key(const std::vector<test_event_entry>& events, cryptonote vector<tx_destination_entry> destinations; fill_tx_sources_and_destinations(events, blk_head, from, to, amount, fee, nmix, sources, destinations); - return construct_tx(from.get_keys(), sources, destinations, std::vector<uint8_t>(), tx, 0); + return construct_tx(from.get_keys(), sources, destinations, from.get_keys().m_account_address, std::vector<uint8_t>(), tx, 0); } transaction construct_tx_with_fee(std::vector<test_event_entry>& events, const block& blk_head, diff --git a/tests/core_tests/double_spend.cpp b/tests/core_tests/double_spend.cpp index 58114b026..d82120254 100644 --- a/tests/core_tests/double_spend.cpp +++ b/tests/core_tests/double_spend.cpp @@ -29,7 +29,7 @@ // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "chaingen.h" -#include "chaingen_tests_list.h" +#include "double_spend.h" using namespace epee; using namespace cryptonote; diff --git a/tests/core_tests/double_spend.inl b/tests/core_tests/double_spend.inl index 438e39e47..bf63503ae 100644 --- a/tests/core_tests/double_spend.inl +++ b/tests/core_tests/double_spend.inl @@ -144,7 +144,7 @@ bool gen_double_spend_in_tx<txs_keeped_by_block>::generate(std::vector<test_even destinations.push_back(de); cryptonote::transaction tx_1; - if (!construct_tx(bob_account.get_keys(), sources, destinations, std::vector<uint8_t>(), tx_1, 0)) + if (!construct_tx(bob_account.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tx_1, 0)) return false; SET_EVENT_VISITOR_SETT(events, event_visitor_settings::set_txs_keeped_by_block, txs_keeped_by_block); diff --git a/tests/core_tests/integer_overflow.cpp b/tests/core_tests/integer_overflow.cpp index 3ac55c073..4abdfbff5 100644 --- a/tests/core_tests/integer_overflow.cpp +++ b/tests/core_tests/integer_overflow.cpp @@ -29,8 +29,6 @@ // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "chaingen.h" -#include "chaingen_tests_list.h" - #include "integer_overflow.h" using namespace epee; @@ -65,6 +63,7 @@ namespace se.real_output = 0; se.rct = false; se.real_out_tx_key = get_tx_pub_key_from_extra(tx); + se.real_out_additional_tx_keys = get_additional_tx_pub_keys_from_extra(tx); se.real_output_in_tx_index = out_idx; sources.push_back(se); @@ -175,7 +174,7 @@ bool gen_uint_overflow_2::generate(std::vector<test_event_entry>& events) const destinations.push_back(tx_destination_entry(sources.front().amount - MONEY_SUPPLY - MONEY_SUPPLY + 1 - TESTS_DEFAULT_FEE, bob_addr, false)); cryptonote::transaction tx_1; - if (!construct_tx(miner_account.get_keys(), sources, destinations, std::vector<uint8_t>(), tx_1, 0)) + if (!construct_tx(miner_account.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tx_1, 0)) return false; events.push_back(tx_1); @@ -201,7 +200,7 @@ bool gen_uint_overflow_2::generate(std::vector<test_event_entry>& events) const destinations.push_back(de); cryptonote::transaction tx_2; - if (!construct_tx(bob_account.get_keys(), sources, destinations, std::vector<uint8_t>(), tx_2, 0)) + if (!construct_tx(bob_account.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tx_2, 0)) return false; events.push_back(tx_2); diff --git a/tests/core_tests/rct.cpp b/tests/core_tests/rct.cpp index 8a38cbc22..50f65cc67 100644 --- a/tests/core_tests/rct.cpp +++ b/tests/core_tests/rct.cpp @@ -30,7 +30,7 @@ #include "ringct/rctSigs.h" #include "chaingen.h" -#include "chaingen_tests_list.h" +#include "rct.h" using namespace epee; using namespace crypto; diff --git a/tests/core_tests/ring_signature_1.cpp b/tests/core_tests/ring_signature_1.cpp index f9ec68e45..43c63dc53 100644 --- a/tests/core_tests/ring_signature_1.cpp +++ b/tests/core_tests/ring_signature_1.cpp @@ -29,7 +29,7 @@ // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "chaingen.h" -#include "chaingen_tests_list.h" +#include "ring_signature_1.h" using namespace epee; using namespace cryptonote; diff --git a/tests/core_tests/transaction_tests.cpp b/tests/core_tests/transaction_tests.cpp index dcba36e80..00c602103 100644 --- a/tests/core_tests/transaction_tests.cpp +++ b/tests/core_tests/transaction_tests.cpp @@ -108,7 +108,7 @@ bool test_transaction_generation_and_ring_signature() destinations.push_back(td); transaction tx_rc1; - bool r = construct_tx(miner_acc2.get_keys(), sources, destinations, std::vector<uint8_t>(), tx_rc1, 0); + bool r = construct_tx(miner_acc2.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tx_rc1, 0); CHECK_AND_ASSERT_MES(r, false, "failed to construct transaction"); crypto::hash pref_hash = get_transaction_prefix_hash(tx_rc1); diff --git a/tests/core_tests/tx_validation.cpp b/tests/core_tests/tx_validation.cpp index 0e4b2e71a..9987f80d6 100644 --- a/tests/core_tests/tx_validation.cpp +++ b/tests/core_tests/tx_validation.cpp @@ -29,7 +29,7 @@ // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "chaingen.h" -#include "chaingen_tests_list.h" +#include "tx_validation.h" using namespace epee; using namespace crypto; diff --git a/tests/core_tests/v2_tests.cpp b/tests/core_tests/v2_tests.cpp index f1256cb64..6c2f91fcf 100644 --- a/tests/core_tests/v2_tests.cpp +++ b/tests/core_tests/v2_tests.cpp @@ -29,7 +29,7 @@ // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "chaingen.h" -#include "chaingen_tests_list.h" +#include "v2_tests.h" using namespace epee; using namespace crypto; @@ -108,7 +108,7 @@ bool gen_v2_tx_validation_base::generate_with(std::vector<test_event_entry>& eve destinations.push_back(td); transaction tx; - bool r = construct_tx(miner_accounts[0].get_keys(), sources, destinations, std::vector<uint8_t>(), tx, 0); + bool r = construct_tx(miner_accounts[0].get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tx, 0); CHECK_AND_ASSERT_MES(r, false, "failed to construct transaction"); if (!valid) DO_CALLBACK(events, "mark_invalid_tx"); |