-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46184c9
commit d16d88f
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/tests/integration/test-data/foundry/test/NestedStructs.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity =0.8.13; | ||
|
||
import "forge-std/Test.sol"; | ||
|
||
contract NestedStructsTest is Test { | ||
struct Processor { | ||
Window windows; | ||
} | ||
|
||
struct Window { | ||
Frame[] frames; | ||
bytes32 hash; | ||
} | ||
|
||
struct Frame { | ||
Pointer position; | ||
bytes32 root; | ||
} | ||
|
||
struct Pointer { | ||
PointerType pointerType; | ||
uint256 value; | ||
} | ||
|
||
enum PointerType { | ||
INT32, | ||
INT64 | ||
} | ||
|
||
function prove_fourfold_nested_struct(Processor calldata initialProcessor) external pure { | ||
assert(initialProcessor.windows.frames.length == 2); | ||
} | ||
} |