Skip to content

Commit

Permalink
Reenable more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
acuarica committed Jan 15, 2024
1 parent e1ee1c4 commit ce49d7b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/contracts/variables.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { contracts } from '../utils/solc';

contracts('variables', (compile, _fallback, version) => {
describe('with private variables in different locations', function () {
const isPush = version !== '0.8.16' && version !== '0.8.21';

let contract: Contract;

before(function () {
Expand All @@ -26,17 +28,15 @@ contracts('variables', (compile, _fallback, version) => {
{ sig: 'setValue0(bytes32)', value: 1n },
].forEach(({ sig, value }) => {
const selector = fnselector(sig);
it.skip(`should find \`SStore\`s in \`#${selector}\`\`${sig}\` blocks`, function () {
it(`should find \`SStore\`s in \`#${selector}\`\`${sig}\` blocks`, function () {
const stmts = contract.functions[selector].stmts;
expect(stmts.length).to.be.of.greaterThanOrEqual(3);
expect(stmts.at(-3)).to.be.instanceOf(Require);
const isPush = version !== '0.8.16';
expect(stmts.at(-2)).to.be.deep.equal(
new SStore(
new Val(value, true),
new CallDataLoad(new Val(4n, isPush)),
undefined
// contract.variables
contract.variables.get(value)
)
);
expect(stmts.at(-1)).to.be.deep.equal(new Stop());
Expand All @@ -46,7 +46,6 @@ contracts('variables', (compile, _fallback, version) => {
it('should get variables of different types', function () {
const vars = [...contract.variables.values()];
expect(vars).to.be.of.length(2);
const isPush = version !== '0.8.16' && version !== '0.8.21';
expect(vars[0]).to.be.deep.equal(
new Variable(null, [new CallDataLoad(new Val(4n, isPush))], 1)
);
Expand Down

0 comments on commit ce49d7b

Please sign in to comment.