diff --git a/test/unittests/CMakeLists.txt b/test/unittests/CMakeLists.txt index 2b7c642..f71b5db 100644 --- a/test/unittests/CMakeLists.txt +++ b/test/unittests/CMakeLists.txt @@ -21,6 +21,7 @@ add_executable( instructions_test.cpp loader_mock.h loader_test.cpp + mocked_host_test.cpp ) target_link_libraries( diff --git a/test/unittests/cpp_test.cpp b/test/unittests/cpp_test.cpp index 7cd30a2..f7e4934 100644 --- a/test/unittests/cpp_test.cpp +++ b/test/unittests/cpp_test.cpp @@ -634,17 +634,3 @@ TEST(cpp, result_create) EXPECT_TRUE(std::memcmp(c.output_data, r.output_data, c.output_size) == 0); c.release(&c); } - -TEST(cpp, mocked_account) -{ - using namespace evmc::literals; - - evmc::MockedAccount account; - EXPECT_EQ(account.nonce, 0); - --account.nonce; - account.set_balance(0x0102030405060708); - - EXPECT_EQ(account.balance, - 0x0000000000000000000000000000000000000000000000000102030405060708_bytes32); - EXPECT_EQ(account.nonce, -1); -} diff --git a/test/unittests/mocked_host_test.cpp b/test/unittests/mocked_host_test.cpp new file mode 100644 index 0000000..4e8a402 --- /dev/null +++ b/test/unittests/mocked_host_test.cpp @@ -0,0 +1,20 @@ +// EVMC: Ethereum Client-VM Connector API. +// Copyright 2019 The EVMC Authors. +// Licensed under the Apache License, Version 2.0. + +#include +#include + +TEST(mocked_host, mocked_account) +{ + using namespace evmc::literals; + + evmc::MockedAccount account; + EXPECT_EQ(account.nonce, 0); + --account.nonce; + account.set_balance(0x0102030405060708); + + EXPECT_EQ(account.balance, + 0x0000000000000000000000000000000000000000000000000102030405060708_bytes32); + EXPECT_EQ(account.nonce, -1); +}