From a5903087323663a26b484cdf27c09da8bfc2c762 Mon Sep 17 00:00:00 2001 From: milosdjurica Date: Thu, 5 Sep 2024 20:34:07 +0200 Subject: [PATCH] named imports and changed tests names in test/StdStorage.t.sol --- test/StdStorage.t.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/StdStorage.t.sol b/test/StdStorage.t.sol index 89984bca..fd79abaa 100644 --- a/test/StdStorage.t.sol +++ b/test/StdStorage.t.sol @@ -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; @@ -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(); } @@ -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 @@ -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);