Skip to content

Commit 08cdb1e

Browse files
committed
Fix clang format
1 parent cb1bf20 commit 08cdb1e

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/test/app/Wasm_test.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,11 @@ struct Wasm_test : public beast::unit_test::suite
547547
[[maybe_unused]] uint256 const nft1{token::getNextID(env, alan, 0u)};
548548

549549
env(token::mint(alan, 0u),
550-
token::uri(
551-
"https://github.com/XRPLF/XRPL-Standards/discussions/"
552-
"279?id=github.com/XRPLF/XRPL-Standards/discussions/"
553-
"279&ut=github.com/XRPLF/XRPL-Standards/discussions/"
554-
"279&sid=github.com/XRPLF/XRPL-Standards/discussions/"
555-
"279&aot=github.com/XRPLF/XRPL-Standards/disc"));
550+
token::uri("https://github.com/XRPLF/XRPL-Standards/discussions/"
551+
"279?id=github.com/XRPLF/XRPL-Standards/discussions/"
552+
"279&ut=github.com/XRPLF/XRPL-Standards/discussions/"
553+
"279&sid=github.com/XRPLF/XRPL-Standards/discussions/"
554+
"279&aot=github.com/XRPLF/XRPL-Standards/disc"));
556555
[[maybe_unused]] uint256 const nft2{token::getNextID(env, alan, 0u)};
557556
env(token::mint(alan, 0u));
558557
env.close();
@@ -756,28 +755,28 @@ struct Wasm_test : public beast::unit_test::suite
756755
}
757756

758757
{ // return 0 whithout calling wasm
759-
std::vector<WasmParam> params = {{.type = WT_U8V, .of = {.u8v = {.d = buf1, .sz = 0} } }};
758+
std::vector<WasmParam> params = {{.type = WT_U8V, .of = {.u8v = {.d = buf1, .sz = 0 } } }};
760759
auto& engine = WasmEngine::instance();
761760
auto re = engine.run(badAllocWasm, hfs, "test", params, {}, 1'000'000, env.journal);
762761
BEAST_EXPECT(!re) && BEAST_EXPECT(re.error() == tecFAILED_PROCESSING);
763762
}
764763

765764
{ // forged "allocate" return 8Mb (which is more than memory limit)
766-
std::vector<WasmParam> params = {{.type = WT_U8V, .of = {.u8v = {.d = buf1, .sz = 1} } }};
765+
std::vector<WasmParam> params = {{.type = WT_U8V, .of = {.u8v = {.d = buf1, .sz = 1 } } }};
767766
auto& engine = WasmEngine::instance();
768767
auto re = engine.run(badAllocWasm, hfs, "test", params, {}, 1'000'000, env.journal);
769768
BEAST_EXPECT(!re) && BEAST_EXPECT(re.error() == tecFAILED_PROCESSING);
770769
}
771770

772771
{ // forged "allocate" return 0
773-
std::vector<WasmParam> params = {{.type = WT_U8V, .of = {.u8v = {.d = buf1, .sz = 2} } }};
772+
std::vector<WasmParam> params = {{.type = WT_U8V, .of = {.u8v = {.d = buf1, .sz = 2 } } }};
774773
auto& engine = WasmEngine::instance();
775774
auto re = engine.run(badAllocWasm, hfs, "test", params, {}, 1'000'000, env.journal);
776775
BEAST_EXPECT(!re) && BEAST_EXPECT(re.error() == tecFAILED_PROCESSING);
777776
}
778777

779778
{ // forged "allocate" return -1
780-
std::vector<WasmParam> params = {{.type = WT_U8V, .of = {.u8v = {.d = buf1, .sz = 3} } }};
779+
std::vector<WasmParam> params = {{.type = WT_U8V, .of = {.u8v = {.d = buf1, .sz = 3 } } }};
781780
auto& engine = WasmEngine::instance();
782781
auto re = engine.run(badAllocWasm, hfs, "test", params, {}, 1'000'000, env.journal);
783782

src/xrpld/app/wasm/WasmiVM.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ struct InstanceWrapper
125125
std::int64_t
126126
getGas() const;
127127

128-
std::int64_t
129-
setGas(std::int64_t) const;
128+
std::int64_t setGas(std::int64_t) const;
130129
};
131130

132131
struct ModuleWrapper

0 commit comments

Comments
 (0)