Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnxie999 committed Feb 2, 2023
1 parent dc4f146 commit 78dd062
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 71 deletions.
2 changes: 1 addition & 1 deletion src/test/app/NFTokenBurn_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ class NFTokenBurn_test : public beast::unit_test::suite
FeatureBitset const all{supported_amendments()};
FeatureBitset const fixNFTDir{fixNFTokenDirV1};

testWithFeats(all - fixNFTDir);
testWithFeats(all - fixNFTDir - fixUnburnableNFToken);
testWithFeats(all - fixUnburnableNFToken);
testWithFeats(all);
}
Expand Down
20 changes: 18 additions & 2 deletions src/test/app/NFTokenDir_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,16 @@ class NFTokenDir_test : public beast::unit_test::suite
Account const& account = accounts.emplace_back(
Account::base58Seed, std::string(seed));
env.fund(XRP(10000), account);
env.close();

// Should not advance ledger if fixUnburnableNFToken is
// enabled. Because otherwise, accounts are initialized at
// different ledgers, and will have different account
// sequences, which then cause the sequence number of
// NFTokenIDs to be different
if (!features[fixUnburnableNFToken])
env.close();
}
env.close();

// All of the accounts create one NFT and and offer that NFT to
// buyer.
Expand Down Expand Up @@ -408,8 +416,16 @@ class NFTokenDir_test : public beast::unit_test::suite
Account const& account = accounts.emplace_back(
Account::base58Seed, std::string(seed));
env.fund(XRP(10000), account);
env.close();

// Should not advance ledger if fixUnburnableNFToken is
// enabled. Because otherwise, accounts are initialized at
// different ledgers, and will have different account
// sequences, which then cause the sequence number of
// NFTokenIDs to be different
if (!features[fixUnburnableNFToken])
env.close();
}
env.close();

// All of the accounts create one NFT and and offer that NFT to
// buyer.
Expand Down
Loading

0 comments on commit 78dd062

Please sign in to comment.