You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
927 B
32 lines
927 B
const { BN } = require('@openzeppelin/test-helpers');
|
|
|
|
const EnumerableAddressSetMock = artifacts.require('EnumerableAddressSetMock');
|
|
const EnumerableUintSetMock = artifacts.require('EnumerableUintSetMock');
|
|
|
|
const { shouldBehaveLikeSet } = require('./EnumerableSet.behavior');
|
|
|
|
contract('EnumerableSet', function (accounts) {
|
|
// AddressSet
|
|
describe('EnumerableAddressSet', function () {
|
|
const [ accountA, accountB, accountC ] = accounts;
|
|
|
|
beforeEach(async function () {
|
|
this.set = await EnumerableAddressSetMock.new();
|
|
});
|
|
|
|
shouldBehaveLikeSet(accountA, accountB, accountC);
|
|
});
|
|
|
|
// UintSet
|
|
describe('EnumerableUintSet', function () {
|
|
const uintA = new BN('1234');
|
|
const uintB = new BN('5678');
|
|
const uintC = new BN('9101112');
|
|
|
|
beforeEach(async function () {
|
|
this.set = await EnumerableUintSetMock.new();
|
|
});
|
|
|
|
shouldBehaveLikeSet(uintA, uintB, uintC);
|
|
});
|
|
});
|
|
|