Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
d9e7b753
Commit
d9e7b753
authored
Jun 26, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock: lint lib position tests
Typo in succeeds
parent
33528ef1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
LibPosition.t.sol
packages/contracts-bedrock/contracts/test/LibPosition.t.sol
+8
-8
No files found.
packages/contracts-bedrock/contracts/test/LibPosition.t.sol
View file @
d9e7b753
...
@@ -22,7 +22,7 @@ contract LibPosition_Test is Test {
...
@@ -22,7 +22,7 @@ contract LibPosition_Test is Test {
}
}
/// @notice Tests that the `depth` function correctly shifts out the `depth` from a packed `Position` type.
/// @notice Tests that the `depth` function correctly shifts out the `depth` from a packed `Position` type.
function testFuzz_depth_correctness_suceeds(uint8 _depth, uint64 _indexAtDepth) public {
function testFuzz_depth_correctness_suc
c
eeds(uint8 _depth, uint64 _indexAtDepth) public {
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
Position position = LibPosition.wrap(_depth, _indexAtDepth);
Position position = LibPosition.wrap(_depth, _indexAtDepth);
...
@@ -30,7 +30,7 @@ contract LibPosition_Test is Test {
...
@@ -30,7 +30,7 @@ contract LibPosition_Test is Test {
}
}
/// @notice Tests that the `indexAtDepth` function correctly shifts out the `indexAtDepth` from a packed `Position` type.
/// @notice Tests that the `indexAtDepth` function correctly shifts out the `indexAtDepth` from a packed `Position` type.
function testFuzz_indexAtDepth_correctness_suceeds(uint8 _depth, uint64 _indexAtDepth) public {
function testFuzz_indexAtDepth_correctness_suc
c
eeds(uint8 _depth, uint64 _indexAtDepth) public {
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
Position position = LibPosition.wrap(_depth, _indexAtDepth);
Position position = LibPosition.wrap(_depth, _indexAtDepth);
...
@@ -38,7 +38,7 @@ contract LibPosition_Test is Test {
...
@@ -38,7 +38,7 @@ contract LibPosition_Test is Test {
}
}
/// @notice Tests that the `left` function correctly computes the position of the left child.
/// @notice Tests that the `left` function correctly computes the position of the left child.
function testFuzz_left_correctness_suceeds(uint8 _depth, uint64 _indexAtDepth) public {
function testFuzz_left_correctness_suc
c
eeds(uint8 _depth, uint64 _indexAtDepth) public {
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
...
@@ -50,7 +50,7 @@ contract LibPosition_Test is Test {
...
@@ -50,7 +50,7 @@ contract LibPosition_Test is Test {
}
}
/// @notice Tests that the `right` function correctly computes the position of the right child.
/// @notice Tests that the `right` function correctly computes the position of the right child.
function testFuzz_right_correctness_suceeds(uint8 _depth, uint64 _indexAtDepth) public {
function testFuzz_right_correctness_suc
c
eeds(uint8 _depth, uint64 _indexAtDepth) public {
// Depth bound: [0, 63]
// Depth bound: [0, 63]
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
...
@@ -63,7 +63,7 @@ contract LibPosition_Test is Test {
...
@@ -63,7 +63,7 @@ contract LibPosition_Test is Test {
}
}
/// @notice Tests that the `parent` function correctly computes the position of the parent.
/// @notice Tests that the `parent` function correctly computes the position of the parent.
function testFuzz_parent_correctness_suceeds(uint8 _depth, uint64 _indexAtDepth) public {
function testFuzz_parent_correctness_suc
c
eeds(uint8 _depth, uint64 _indexAtDepth) public {
_depth = uint8(bound(_depth, 1, MAX_DEPTH));
_depth = uint8(bound(_depth, 1, MAX_DEPTH));
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
...
@@ -76,7 +76,7 @@ contract LibPosition_Test is Test {
...
@@ -76,7 +76,7 @@ contract LibPosition_Test is Test {
/// @notice Tests that the `rightIndex` function correctly computes the deepest, right most index relative
/// @notice Tests that the `rightIndex` function correctly computes the deepest, right most index relative
/// to a given position.
/// to a given position.
function testFuzz_rightIndex_correctness_suceeds(
function testFuzz_rightIndex_correctness_suc
c
eeds(
uint64 _maxDepth,
uint64 _maxDepth,
uint8 _depth,
uint8 _depth,
uint64 _indexAtDepth
uint64 _indexAtDepth
...
@@ -102,7 +102,7 @@ contract LibPosition_Test is Test {
...
@@ -102,7 +102,7 @@ contract LibPosition_Test is Test {
/// @notice Tests that the `attack` function correctly computes the position of the attack relative to
/// @notice Tests that the `attack` function correctly computes the position of the attack relative to
/// a given position.
/// a given position.
/// @dev `attack` is an alias for `left`, but we test it separately for completeness.
/// @dev `attack` is an alias for `left`, but we test it separately for completeness.
function testFuzz_attack_correctness_suceeds(uint8 _depth, uint64 _indexAtDepth) public {
function testFuzz_attack_correctness_suc
c
eeds(uint8 _depth, uint64 _indexAtDepth) public {
// Depth bound: [0, 63]
// Depth bound: [0, 63]
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_depth = uint8(bound(_depth, 0, MAX_DEPTH));
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
...
@@ -118,7 +118,7 @@ contract LibPosition_Test is Test {
...
@@ -118,7 +118,7 @@ contract LibPosition_Test is Test {
/// a given position.
/// a given position.
/// @dev A defense can only be given if the position does not belong to the root claim, hence the bound of [1, 127]
/// @dev A defense can only be given if the position does not belong to the root claim, hence the bound of [1, 127]
/// on the depth.
/// on the depth.
function testFuzz_defend_correctness_suceeds(uint8 _depth, uint64 _indexAtDepth) public {
function testFuzz_defend_correctness_suc
c
eeds(uint8 _depth, uint64 _indexAtDepth) public {
// Depth bound: [1, 63]
// Depth bound: [1, 63]
_depth = uint8(bound(_depth, 1, MAX_DEPTH));
_depth = uint8(bound(_depth, 1, MAX_DEPTH));
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
_indexAtDepth = boundIndexAtDepth(_depth, _indexAtDepth);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment