Skip to content

Commit

Permalink
adding test described in #207 (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janther authored Mar 3, 2020
1 parent 16c0a0a commit 056ee73
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Arrays/Arrays.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ pragma solidity ^0.5.2;

contract Arrays {
bytes32[] public permissions = [bytes32("addPartner"), bytes32("removePartner"), bytes32("addGroup"), bytes32("removeGroup"), bytes32("addUserToGroup"), bytes32("removeUserFromGroup"), bytes32("addSolution"), bytes32("removeSolution"), bytes32("addLibrary"), bytes32("removeLibrary"), bytes32("addPermissionToGroup"), bytes32("removePermissionFromGroup")];

function a() {
Outcome.OutcomeItem[] memory outcomeFrom = abi.decode(fromPart.outcome, (Outcome.OutcomeItem[]));
}
}
11 changes: 11 additions & 0 deletions tests/Arrays/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ pragma solidity ^0.5.2;
contract Arrays {
bytes32[] public permissions = [bytes32("addPartner"), bytes32("removePartner"), bytes32("addGroup"), bytes32("removeGroup"), bytes32("addUserToGroup"), bytes32("removeUserFromGroup"), bytes32("addSolution"), bytes32("removeSolution"), bytes32("addLibrary"), bytes32("removeLibrary"), bytes32("addPermissionToGroup"), bytes32("removePermissionFromGroup")];
function a() {
Outcome.OutcomeItem[] memory outcomeFrom = abi.decode(fromPart.outcome, (Outcome.OutcomeItem[]));
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pragma solidity ^0.5.2;
Expand All @@ -25,6 +29,13 @@ contract Arrays {
bytes32("addPermissionToGroup"),
bytes32("removePermissionFromGroup")
];
function a() {
Outcome.OutcomeItem[] memory outcomeFrom = abi.decode(
fromPart.outcome,
(Outcome.OutcomeItem[])
);
}
}
`;

0 comments on commit 056ee73

Please sign in to comment.