Add uint to uint enumerable map (#3338)
This commit is contained in:
@ -3,6 +3,7 @@ const { BN, constants } = require('@openzeppelin/test-helpers');
|
||||
const AddressToUintMapMock = artifacts.require('AddressToUintMapMock');
|
||||
const UintToAddressMapMock = artifacts.require('UintToAddressMapMock');
|
||||
const Bytes32ToBytes32MapMock = artifacts.require('Bytes32ToBytes32MapMock');
|
||||
const UintToUintMapMock = artifacts.require('UintToUintMapMock');
|
||||
|
||||
const { shouldBehaveLikeMap } = require('./EnumerableMap.behavior');
|
||||
|
||||
@ -55,4 +56,17 @@ contract('EnumerableMap', function (accounts) {
|
||||
constants.ZERO_BYTES32,
|
||||
);
|
||||
});
|
||||
|
||||
// UintToUintMap
|
||||
describe('UintToUintMap', function () {
|
||||
beforeEach(async function () {
|
||||
this.map = await UintToUintMapMock.new();
|
||||
});
|
||||
|
||||
shouldBehaveLikeMap(
|
||||
[ keyA, keyB, keyC ],
|
||||
[ keyA, keyB, keyC ].map(k => k.add(new BN('1332'))),
|
||||
new BN('0'),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user