Skip to content

Commit 056ee73

Browse files
authored
adding test described in #207 (#248)
1 parent 16c0a0a commit 056ee73

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/Arrays/Arrays.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ pragma solidity ^0.5.2;
22

33
contract Arrays {
44
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")];
5+
6+
function a() {
7+
Outcome.OutcomeItem[] memory outcomeFrom = abi.decode(fromPart.outcome, (Outcome.OutcomeItem[]));
8+
}
59
}

tests/Arrays/__snapshots__/jsfmt.spec.js.snap

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ pragma solidity ^0.5.2;
55
66
contract Arrays {
77
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")];
8+
9+
function a() {
10+
Outcome.OutcomeItem[] memory outcomeFrom = abi.decode(fromPart.outcome, (Outcome.OutcomeItem[]));
11+
}
812
}
913
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1014
pragma solidity ^0.5.2;
@@ -25,6 +29,13 @@ contract Arrays {
2529
bytes32("addPermissionToGroup"),
2630
bytes32("removePermissionFromGroup")
2731
];
32+
33+
function a() {
34+
Outcome.OutcomeItem[] memory outcomeFrom = abi.decode(
35+
fromPart.outcome,
36+
(Outcome.OutcomeItem[])
37+
);
38+
}
2839
}
2940
3041
`;

0 commit comments

Comments
 (0)