mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 07:10:53 +00:00
feat: Porting wasm host function tests to new design
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <tx/wasm/RealHostFixture.h>
|
||||
|
||||
#include <expected>
|
||||
|
||||
namespace xrpl::test {
|
||||
|
||||
struct ParentLedgerTimeImpl : WasmImplTest
|
||||
{
|
||||
};
|
||||
|
||||
TEST_F(ParentLedgerTimeImpl, MatchesLedger)
|
||||
{
|
||||
auto const result = host().getParentLedgerTime();
|
||||
ASSERT_TRUE(result.has_value());
|
||||
EXPECT_EQ(*result, ledger.getOpenLedger().parentCloseTime().time_since_epoch().count());
|
||||
}
|
||||
|
||||
} // namespace xrpl::test
|
||||
Reference in New Issue
Block a user