mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 22:30:57 +00:00
Pre-commit and removed implementation docs
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
#include <tx/wasm/WasmFixture.h>
|
||||
|
||||
#include <xrpl/basics/Slice.h>
|
||||
#include <xrpl/basics/base_uint.h>
|
||||
#include <xrpl/protocol/Protocol.h>
|
||||
@@ -8,6 +6,7 @@
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <tx/wasm/WasmFixture.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
@@ -294,8 +293,7 @@ protected:
|
||||
TEST_F(TraceNumCall, I64ArrivesWholeIncludingMostNegativeValue)
|
||||
{
|
||||
EXPECT_CALL(
|
||||
host_,
|
||||
traceNum(std::string_view("count"), std::numeric_limits<std::int64_t>::min()))
|
||||
host_, traceNum(std::string_view("count"), std::numeric_limits<std::int64_t>::min()))
|
||||
.WillOnce(Return(0));
|
||||
|
||||
EXPECT_EQ(hostAnswer(), 0);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#include <tx/wasm/WasmFixture.h>
|
||||
|
||||
#include <xrpl/protocol/TER.h>
|
||||
#include <xrpl/tx/wasm/WasmCommon.h>
|
||||
#include <xrpl/tx/wasm/WasmVM.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <tx/wasm/WasmFixture.h>
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <tx/wasm/MockHostFunctions.h>
|
||||
|
||||
#include <xrpl/beast/utility/Journal.h>
|
||||
#include <xrpl/tx/wasm/WasmCommon.h>
|
||||
#include <xrpl/tx/wasm/WasmVM.h>
|
||||
|
||||
#include <xrpl_wasm_testkit_cxxbridge/lib.h>
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <tx/wasm/MockHostFunctions.h>
|
||||
#include <xrpl_wasm_testkit_cxxbridge/lib.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#include <tx/wasm/WasmFixture.h>
|
||||
#include <xrpl/tx/wasm/WasmVM.h>
|
||||
|
||||
#include <xrpl/basics/contract.h>
|
||||
#include <xrpl/protocol/TER.h>
|
||||
#include <xrpl/tx/wasm/WasmCommon.h>
|
||||
#include <xrpl/tx/wasm/WasmVM.h>
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <tx/wasm/WasmFixture.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <stdexcept>
|
||||
@@ -173,13 +173,9 @@ TEST_F(WasmVMTest, UnrunnableModuleIsNodeSideFault)
|
||||
Bytes code;
|
||||
std::string_view entryPoint;
|
||||
} const cases[] = {
|
||||
{.what = "not wasm at all",
|
||||
.code = Bytes{0, 1, 2, 3},
|
||||
.entryPoint = escrowFunctionName},
|
||||
{.what = "not wasm at all", .code = Bytes{0, 1, 2, 3}, .entryPoint = escrowFunctionName},
|
||||
{.what = "empty", .code = Bytes{}, .entryPoint = escrowFunctionName},
|
||||
{.what = "no such export",
|
||||
.code = assemble(kEngineWat),
|
||||
.entryPoint = "no_such_export"},
|
||||
{.what = "no such export", .code = assemble(kEngineWat), .entryPoint = "no_such_export"},
|
||||
{.what = "export is not a function",
|
||||
.code = assemble(kEngineWat),
|
||||
.entryPoint = "not_a_function"},
|
||||
@@ -302,9 +298,10 @@ TEST_F(WasmVMTest, FatalHostErrorStopsRun)
|
||||
// the host, and must not take the node with it.
|
||||
TEST_F(WasmVMTest, ThrowingHostFunctionBecomesInternal)
|
||||
{
|
||||
EXPECT_CALL(host_, getLedgerSqn()).WillOnce([]() -> std::expected<std::uint32_t, HostFunctionError> {
|
||||
Throw<std::runtime_error>("the ledger came apart");
|
||||
});
|
||||
EXPECT_CALL(host_, getLedgerSqn())
|
||||
.WillOnce([]() -> std::expected<std::uint32_t, HostFunctionError> {
|
||||
Throw<std::runtime_error>("the ledger came apart");
|
||||
});
|
||||
|
||||
auto const outcome = run(kEngineWat, kAmpleGas, "calls_the_host");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user