Skip to content

Commit

Permalink
named imports and changed tests names in test/StdStorage.t.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
milosdjurica committed Sep 5, 2024
1 parent 46886f2 commit a590308
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/StdStorage.t.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;

import "../src/StdStorage.sol";
import "../src/Test.sol";
import {stdStorage, StdStorage} from "../src/StdStorage.sol";
import {Test} from "../src/Test.sol";

contract StdStorageTest is Test {
using stdStorage for StdStorage;
Expand Down Expand Up @@ -230,7 +230,7 @@ contract StdStorageTest is Test {
assertEq(val, true);
}

function test_StorageReadBool_Revert() public {
function test_RevertIf_ReadingNonBoolValue() public {
vm.expectRevert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.");
this.readNonBoolValue();
}
Expand All @@ -254,7 +254,7 @@ contract StdStorageTest is Test {
assertEq(val, type(int256).min);
}

function testFuzzPacked(uint256 val, uint8 elemToGet) public {
function testFuzz_Packed(uint256 val, uint8 elemToGet) public {
// This function tries an assortment of packed slots, shifts meaning number of elements
// that are packed. Shiftsizes are the size of each element, i.e. 8 means a data type that is 8 bits, 16 == 16 bits, etc.
// Combined, these determine how a slot is packed. Making it random is too hard to avoid global rejection limit
Expand Down Expand Up @@ -296,7 +296,7 @@ contract StdStorageTest is Test {
}
}

function testFuzzPacked2(uint256 nvars, uint256 seed) public {
function testFuzz_Packed2(uint256 nvars, uint256 seed) public {
// Number of random variables to generate.
nvars = bound(nvars, 1, 20);

Expand Down

0 comments on commit a590308

Please sign in to comment.