Open Sword-Smith opened 3 years ago
Test where pay pays to tokenId != 0, and payout < maxFactor Test where pay pays to tokenId == 0 where payout belongs to a scale factor that was lower than maxFactor, but non-zero
solved in 5d5fda13e56f450b4237e583c5855942a2aba701 in geth_tools
Test where pay pays to tokenId == 0 where payout belongs to a dead (not-taken) branch in an if-within Test where pay pays to tokenId == 0 where payout belongs to a scale factor that was zero (and thus lower than maxFactor) Test where contract is ready for execution but is called by a party that only has tokenId == 0 assets, and where the other party token payouts have not yet been calculated. tokenId == 0 must be able to get their money, so this evaluation must calculate the payouts for tokenId != 0
Solved in the commits 1369abec6725051c723a15c02c6130c721a9c5e0, 264496d467b705f94e73be69609db26729a7494c, 3dbdb189c343d3fdf7b253692c2d5af81832c3b5 in geth_tools
.
Test where tokenId == N and tokenId == N + p, p > 1 are in the money but the rest have value zero. This tests that the encounter of a zero payout value does not interrupt payouts for tokenIds treated later in the pay() execution.
and
Call pay() multiple times and verify that it is an idempotent operation.
Solved in commit 6e1a058af11fc0c73ff5e9905dee7a169c693c0b to geth_tools
.
pay
pays totokenId != 0
, andpayout == maxFactor
pay
pays totokenId != 0
, andpayout < maxFactor
pay
pays totokenId == 0
where payout belongs to a dead (not-taken) branch in an if-withinpay
pays totokenId == 0
where payout belongs to a scale factor that was lower thanmaxFactor
, but non-zeropay
pays totokenId == 0
where payout belongs to a scale factor that was zero (and thus lower thanmaxFactor
)tokenId == 0
assets, and where the other party token payouts have not yet been calculated.tokenId == 0
must be able to get their money, so this evaluation must calculate the payouts fortokenId != 0
tokenId == N
andtokenId == N + p, p > 1
are in the money but the rest have value zero. This tests that the encounter of a zero payout value does not interrupt payouts fortokenId
s treated later in thepay()
execution.Scale
expression,payout < maxFactor
pay()
multiple times and verify that it is an idempotent operation.pay()
and verify that no payments or token balance resets are made.pay()
with aTransferCall
with a scale expression that evaluates to a negative value (set oracle to a negative value).tokenID = 0
cannot get any payout when contract is not yet evaluated.