Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
josojo committed Jan 11, 2024
1 parent c1c6d7f commit 549977a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion contracts/mixin/ForkableStructure.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract ForkableStructure is IForkableStructure, Initializable {
if (children[0] == address(0x0)) {
revert OnlyAfterForking();
}
// The following line is not needed, as both children are created
// The following line is not needed, as both children are created
// simultaniously
// if (children[1] == address(0x0)) {
// revert OnlyAfterForking();
Expand Down
11 changes: 5 additions & 6 deletions test/CreateChildren.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ contract CreateChildrenTest is Test {
address public implementation = address(new CreateChildrenWrapper());
// Deploy the test contract before running tests
constructor() {
testContract = CreateChildrenWrapper(address(new TransparentUpgradeableProxy(implementation, admin, "")));
testContract = CreateChildrenWrapper(
address(new TransparentUpgradeableProxy(implementation, admin, ""))
);
}

// Test case to check if the implementation address is correctly set
Expand Down Expand Up @@ -44,7 +46,7 @@ contract CreateChildrenTest is Test {
),
implementation
);
assertEq(
assertEq(
CreateChildrenWrapper(child1).getImplementation(),
implementation
);
Expand All @@ -53,10 +55,7 @@ contract CreateChildrenTest is Test {
Util.bytesToAddress(vm.load(address(child1), Util._ADMIN_SLOT)),
admin
);
assertEq(
CreateChildrenWrapper(child1).getAdmin(),
admin
);
assertEq(CreateChildrenWrapper(child1).getAdmin(), admin);

assertEq(
Util.bytesToAddress(
Expand Down
4 changes: 2 additions & 2 deletions test/ForkableStructure.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ contract ForkStructureTest is Test {
);
}

function testModifiers() public{
function testModifiers() public {
forkableStructureImplementation = address(
new ForkableStructureWrapper()
);
Expand All @@ -103,7 +103,7 @@ contract ForkStructureTest is Test {
forkStructure.onlyAfterForkingTesting();

forkStructure.createChildren();

vm.expectRevert(IForkableStructure.NoChangesAfterForking.selector);
forkStructure.onlyBeforeForkingTesting();
forkStructure.onlyAfterForkingTesting();
Expand Down
7 changes: 3 additions & 4 deletions test/testcontract/CreateChildrenWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ pragma solidity ^0.8.20;
// Import the library you want to test
import {CreateChildren} from "../../contracts/lib/CreateChildren.sol";

contract CreateChildrenWrapper {
contract CreateChildrenWrapper {
// Constructor to set initial values in storage slots
constructor(
) {}
constructor() {}

// Function to get the current implementation address for testing purposes
function getImplementation() external view returns (address) {
Expand All @@ -26,4 +25,4 @@ contract CreateChildrenWrapper {
{
return CreateChildren.createChildren();
}
}
}

0 comments on commit 549977a

Please sign in to comment.