Procedural SafeCast.sol generation (#3245)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
const { BN, expectRevert } = require('@openzeppelin/test-helpers');
|
||||
|
||||
const { expect } = require('chai');
|
||||
const { range } = require('../../../scripts/helpers');
|
||||
|
||||
const SafeCastMock = artifacts.require('SafeCastMock');
|
||||
|
||||
@ -41,7 +41,7 @@ contract('SafeCast', async (accounts) => {
|
||||
});
|
||||
}
|
||||
|
||||
[8, 16, 32, 64, 96, 128, 224].forEach(bits => testToUint(bits));
|
||||
range(8, 256, 8).forEach(bits => testToUint(bits));
|
||||
|
||||
describe('toUint256', () => {
|
||||
const maxInt256 = new BN('2').pow(new BN(255)).subn(1);
|
||||
@ -129,7 +129,7 @@ contract('SafeCast', async (accounts) => {
|
||||
});
|
||||
}
|
||||
|
||||
[8, 16, 32, 64, 128].forEach(bits => testToInt(bits));
|
||||
range(8, 256, 8).forEach(bits => testToInt(bits));
|
||||
|
||||
describe('toInt256', () => {
|
||||
const maxUint256 = new BN('2').pow(new BN(256)).subn(1);
|
||||
|
||||
Reference in New Issue
Block a user