Unit test for memo

This commit is contained in:
Mo Morsi
2020-03-19 12:46:40 -04:00
committed by Nik Bougalis
parent 67981f002f
commit f155eaff4b

View File

@@ -587,6 +587,20 @@ public:
env(noop("alice"), memo("data1", "format1", "type1"), memo("data2", "format2", "type2"));
}
void
testMemoResult()
{
using namespace jtx;
Env env(*this);
JTx jt(noop("alice"));
memo("data", "format", "type")(env, jt);
auto const& memo = jt.jv["Memos"][0u]["Memo"];
BEAST_EXPECT(memo["MemoData"].asString() == strHex(std::string("data")));
BEAST_EXPECT(memo["MemoFormat"].asString() == strHex(std::string("format")));
BEAST_EXPECT(memo["MemoType"].asString() == strHex(std::string("type")));
}
void
testAdvance()
{
@@ -859,6 +873,7 @@ public:
testJTxCopy();
testJTxMove();
testMemo();
testMemoResult();
testAdvance();
testClose();
testPath();