Skip to content

Commit

Permalink
test-emulator logs
Browse files Browse the repository at this point in the history
  • Loading branch information
SpyCheese committed Jul 29, 2024
1 parent 25386f5 commit 7a870ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion emulator/test/emulator-tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ TEST(Emulator, wallet_int_and_ext_msg) {
auto int_msg_boc = td::base64_encode(std_boc_serialize(int_msg).move_as_ok());

std::string int_emu_res = transaction_emulator_emulate_transaction(emulator, none_shard_account_boc.c_str(), int_msg_boc.c_str());
LOG(ERROR) << "int_emu_res = " << int_emu_res;

auto int_result_json = td::json_decode(td::MutableSlice(int_emu_res));
CHECK(int_result_json.is_ok());
Expand Down Expand Up @@ -298,6 +299,7 @@ TEST(Emulator, wallet_int_and_ext_msg) {
auto ext_msg = ton::GenericAccount::create_ext_message(address, {}, ext_body.move_as_ok());
auto ext_msg_boc = td::base64_encode(std_boc_serialize(ext_msg).move_as_ok());
std::string ext_emu_res = transaction_emulator_emulate_transaction(emulator, shard_account_after_boc_b64.c_str(), ext_msg_boc.c_str());
LOG(ERROR) << "ext_emu_res = " << ext_emu_res;

auto ext_result_json = td::json_decode(td::MutableSlice(ext_emu_res));
CHECK(ext_result_json.is_ok());
Expand Down Expand Up @@ -373,7 +375,8 @@ TEST(Emulator, tvm_emulator) {
auto rand_seed = std::string(64, 'F');
CHECK(tvm_emulator_set_c7(tvm_emulator, addr_buffer, static_cast<uint32_t>(td::Time::now()), 10 * Ton, rand_seed.c_str(), config_boc));
std::string tvm_res = tvm_emulator_run_get_method(tvm_emulator, method_id, stack_boc.c_str());

LOG(ERROR) << "tvm_res = " << tvm_res;

auto result_json = td::json_decode(td::MutableSlice(tvm_res));
CHECK(result_json.is_ok());
auto result = result_json.move_as_ok();
Expand Down

0 comments on commit 7a870ae

Please sign in to comment.