mirror of https://github.com/status-im/evmc.git
21 lines
553 B
C++
21 lines
553 B
C++
// EVMC: Ethereum Client-VM Connector API.
|
|
// Copyright 2019 The EVMC Authors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
#include <evmc/mocked_host.hpp>
|
|
#include <gtest/gtest.h>
|
|
|
|
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);
|
|
}
|