Remove Time.Delay *At functions (#4606)

Co-authored-by: Francisco Giordano <fg@frang.io>
This commit is contained in:
Hadrien Croubois
2023-09-15 17:23:28 +02:00
committed by GitHub
parent af06fdcfd4
commit 2215d9fd5e
2 changed files with 6 additions and 34 deletions

View File

@ -87,27 +87,6 @@ contract('Time', function () {
}
});
it('getAt & getFullAt', async function () {
const valueBefore = 24194n;
const valueAfter = 4214143n;
for (const timepoint of [...SOME_VALUES, MAX_UINT48])
for (const effect of effectSamplesForTimepoint(timepoint)) {
const isPast = effect <= timepoint;
const delay = packDelay({ valueBefore, valueAfter, effect });
expect(await this.mock.$getAt(delay, timepoint)).to.be.bignumber.equal(
String(isPast ? valueAfter : valueBefore),
);
const getFullAt = await this.mock.$getFullAt(delay, timepoint);
expect(getFullAt[0]).to.be.bignumber.equal(String(isPast ? valueAfter : valueBefore));
expect(getFullAt[1]).to.be.bignumber.equal(String(isPast ? 0n : valueAfter));
expect(getFullAt[2]).to.be.bignumber.equal(String(isPast ? 0n : effect));
}
});
it('get & getFull', async function () {
const timepoint = await clock.timestamp().then(BigInt);
const valueBefore = 24194n;