Skip to content

Commit

Permalink
Rename to core_test_main to entry for consistency (nanocurrency#4572)
Browse files Browse the repository at this point in the history
* Delete stub `core_test/entry.cpp`

* Rename to `core_test_main` to `entry` for consistency

* Fix includes
  • Loading branch information
pwojcikdev authored Apr 17, 2024
1 parent e2c76ca commit 8601543
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 33 deletions.
2 changes: 1 addition & 1 deletion nano/core_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_executable(
core_test
core_test_main.cc
entry.cpp
fakes/websocket_client.hpp
fakes/work_peer.hpp
active_transactions.cpp
Expand Down
30 changes: 0 additions & 30 deletions nano/core_test/core_test_main.cc

This file was deleted.

28 changes: 26 additions & 2 deletions nano/core_test/entry.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
#include <nano/lib/logging.hpp>
#include <nano/node/common.hpp>
#include <nano/secure/utility.hpp>

#include <gtest/gtest.h>

TEST (basic, basic)
#include <boost/filesystem/path.hpp>

constexpr std::size_t OPEN_FILE_DESCRIPTORS_LIMIT = 16384;

namespace nano
{
namespace test
{
void cleanup_dev_directories_on_exit ();
}
void force_nano_dev_network ();
}

GTEST_API_ int main (int argc, char ** argv)
{
ASSERT_TRUE (true);
nano::logger::initialize_for_tests (nano::log_config::tests_default ());
nano::set_file_descriptor_limit (OPEN_FILE_DESCRIPTORS_LIMIT);
nano::force_nano_dev_network ();
nano::node_singleton_memory_pool_purge_guard memory_pool_cleanup_guard;
testing::InitGoogleTest (&argc, argv);
auto res = RUN_ALL_TESTS ();
nano::test::cleanup_dev_directories_on_exit ();
return res;
}

0 comments on commit 8601543

Please sign in to comment.