Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions test/concrete/MockChainDependentOwner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ contract MockChainDependentOwner {
/// @param ownerOnChain The address to answer on `chainId`.
/// @param ownerElsewhere The address to answer everywhere else.
/// @param chainId The chain `ownerOnChain` is answered on.
// Answered back verbatim, authorising nothing, and the fuzz callers reach address(0).
//forge-lint: disable-next-line(missing-zero-check)
constructor(address ownerOnChain, address ownerElsewhere, uint256 chainId) {
iOwnerOnChain = ownerOnChain;
iOwnerElsewhere = ownerElsewhere;
Expand Down
2 changes: 2 additions & 0 deletions test/src/concrete/MigrationRegistryApplyMigration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,8 @@ contract MigrationRegistryApplyMigrationTest is Test {
);

assertEq(sRegistry.applied(writer, namespace, migration), appliedAt);
// The inequality against the block's own moment IS what this asserts.
//forge-lint: disable-next-line(block-timestamp)
assertTrue(sRegistry.applied(writer, namespace, migration) != block.timestamp);
}

Expand Down
8 changes: 3 additions & 5 deletions test/src/lib/LibRainDeploySnapshot.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ contract LibRainDeploySnapshotTest is Test {
/// @param source The snapshot source.
/// @param name The constant's name.
/// @return The value it holds.
function snapshotBytesConstant(string memory source, string memory name) internal view returns (bytes memory) {
function snapshotBytesConstant(string memory source, string memory name) internal pure returns (bytes memory) {
string memory declaration = string.concat("bytes constant ", name, " =");
assertTrue(vm.contains(source, declaration), string.concat("snapshot declares no bytes ", name));
string[] memory afterOpen = vm.split(vm.split(source, declaration)[1], "hex\"");
Expand All @@ -676,7 +676,7 @@ contract LibRainDeploySnapshotTest is Test {
/// @param source The snapshot source.
/// @param name The constant's name.
/// @return The value it holds.
function snapshotAddressConstant(string memory source, string memory name) internal view returns (address) {
function snapshotAddressConstant(string memory source, string memory name) internal pure returns (address) {
string memory declaration = string.concat("address constant ", name, " =");
assertTrue(vm.contains(source, declaration), string.concat("snapshot declares no address ", name));
string[] memory afterOpen = vm.split(vm.split(source, declaration)[1], "address(");
Expand Down Expand Up @@ -1596,9 +1596,7 @@ contract LibRainDeploySnapshotTest is Test {
string memory a = tagOf(aMajor, aMinor, aPatch);
string memory b = tagOf(bMajor, bMinor, bPatch);

bool precedes = aMajor != bMajor
? aMajor < bMajor
: (aMinor != bMinor ? aMinor < bMinor : (aPatch != bPatch ? aPatch < bPatch : false));
bool precedes = aMajor != bMajor ? aMajor < bMajor : (aMinor != bMinor ? aMinor < bMinor : aPatch < bPatch);

assertEq(LibRainDeploySnapshot.tagPrecedes(vm, a, b), precedes);
// Strict, so exactly one of the two orderings holds unless they are the
Expand Down
Loading