Skip to content

Commit

Permalink
simplified unity build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vvysokikh1 committed Jan 17, 2025
1 parent 411a0f0 commit 4c5c9cc
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions src/test/app/Freeze_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,7 @@ class Freeze_test : public beast::unit_test::suite
{
testcase("Longer paths payment on frozen trust lines");
using namespace test::jtx;
using path = test::jtx::path;

Env env(*this, features);
Account G1{"G1"};
Expand Down Expand Up @@ -1035,15 +1036,15 @@ class Freeze_test : public beast::unit_test::suite

// test: A1 cannot send USD using XRP through A2 offer
env(pay(A1, G1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
env.close();

// test: G1 cannot send USD using XRP through A2 offer
env(pay(G1, A1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
Expand All @@ -1061,15 +1062,15 @@ class Freeze_test : public beast::unit_test::suite

// test: A1 cannot send USD using XRP through A2 offer
env(pay(A1, G1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
env.close();

// test: G1 cannot send USD using XRP through A2 offer
env(pay(G1, A1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
Expand All @@ -1087,14 +1088,14 @@ class Freeze_test : public beast::unit_test::suite

// test: A1 can send USD using XRP through A2 offer
env(pay(A1, G1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect));
env.close();

// test: G1 can send USD using XRP through A2 offer
env(pay(G1, A1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect));
env.close();
Expand All @@ -1112,15 +1113,15 @@ class Freeze_test : public beast::unit_test::suite

// test: A1 cannot send USD using XRP through A2 offer
env(pay(A1, G1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
env.close();

// test: G1 cannot send USD using XRP through A2 offer
env(pay(G1, A1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
Expand All @@ -1145,14 +1146,14 @@ class Freeze_test : public beast::unit_test::suite

// test: A1 can send XRP using USD through A2 offer
env(pay(A1, G1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect));
env.close();

// test: G1 can send XRP using USD through A2 offer
env(pay(G1, A1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect));
env.close();
Expand All @@ -1170,15 +1171,15 @@ class Freeze_test : public beast::unit_test::suite

// test: A1 cannot send XRP using USD through A2 offer
env(pay(A1, G1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
env.close();

// test: G1 cannot send XRP using USD through A2 offer
env(pay(G1, A1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
Expand All @@ -1198,7 +1199,7 @@ class Freeze_test : public beast::unit_test::suite
// TODO: This might be not a correct behavior. A2 doesn't want to
// receive USDs.
env(pay(A1, G1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect));
env.close();
Expand All @@ -1207,7 +1208,7 @@ class Freeze_test : public beast::unit_test::suite
// TODO: This might be not a correct behavior. A2 doesn't want to
// receive USDs.
env(pay(G1, A1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect));
env.close();
Expand All @@ -1225,15 +1226,15 @@ class Freeze_test : public beast::unit_test::suite

// test: A1 cannot send XRP using USD through A2 offer
env(pay(A1, G1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
env.close();

// test: G1 cannot send XRP using USD through A2 offer
env(pay(G1, A1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_PARTIAL));
Expand Down Expand Up @@ -1678,6 +1679,7 @@ class Freeze_test : public beast::unit_test::suite
{
testcase("AMM payments on frozen trust lines");
using namespace test::jtx;
using path = test::jtx::path;

Env env(*this, features);
Account G1{"G1"};
Expand Down Expand Up @@ -1705,29 +1707,29 @@ class Freeze_test : public beast::unit_test::suite

// test: can still use XRP to make payment
env(pay(A1, A2, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect));
env.close();

// test: cannot use USD to make payment
env(pay(A1, A2, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_DRY));
env.close();

// test: can still receive USD payments.
env(pay(A2, A1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect));
env.close();

// test: can still receive XRP payments.
env(pay(A2, A1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect));
env.close();
Expand All @@ -1745,30 +1747,30 @@ class Freeze_test : public beast::unit_test::suite

// test: can still use XRP to make payment
env(pay(A1, A2, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect));
env.close();

// test: cannot use USD to make payment
env(pay(A1, A2, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_DRY));
env.close();

// test: cannot receive USD payments.
env(pay(A2, A1, USD(10)),
test::jtx::path(~USD),
path(~USD),
sendmax(XRP(11)),
txflags(tfNoRippleDirect),
ter(tecPATH_DRY));
env.close();

// test: can still receive XRP payments.
env(pay(A2, A1, XRP(10)),
test::jtx::path(~XRP),
path(~XRP),
sendmax(USD(11)),
txflags(tfNoRippleDirect));
env.close();
Expand Down

0 comments on commit 4c5c9cc

Please sign in to comment.