File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33pragma solidity = 0.8.25 ;
44
55import {Test} from "forge-std-1.16.1/src/Test.sol " ;
6- import {BuildScript} from "src/abstract/BuildScript.sol " ;
7-
8- /// @notice Counts the hooks instead of running them, so the entrypoints are
9- /// asserted on dispatch alone. The real `freeze` writes the tag dir named by
10- /// `[package].version` — shared state that `LibSnapshot.t.sol` also drives, and
11- /// forge runs test contracts concurrently, so touching it here would race
12- /// rather than test.
13- contract SpyBuildScript is BuildScript {
14- uint256 public builds;
15- uint256 public freezes;
16-
17- function build () internal override {
18- builds++ ;
19- }
20-
21- function snapshotContractNames () internal pure override returns (string [] memory names ) {
22- names = new string [](0 );
23- }
24-
25- function freeze () internal override {
26- freezes++ ;
27- }
28- }
6+ import {SpyBuildScript} from "./SpyBuildScript.sol " ;
297
308/// @title BuildScriptTest
319contract BuildScriptTest is Test {
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: LicenseRef-DCL-1.0
2+ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
3+ pragma solidity = 0.8.25 ;
4+
5+ import {BuildScript} from "src/abstract/BuildScript.sol " ;
6+
7+ /// @notice Counts the hooks instead of running them, so the entrypoints are
8+ /// asserted on dispatch alone. The real `freeze` writes the tag dir named by
9+ /// `[package].version` — shared state that `LibSnapshot.t.sol` also drives, and
10+ /// forge runs test contracts concurrently, so touching it here would race
11+ /// rather than test.
12+ contract SpyBuildScript is BuildScript {
13+ uint256 public builds;
14+ uint256 public freezes;
15+
16+ function build () internal override {
17+ builds++ ;
18+ }
19+
20+ function snapshotContractNames () internal pure override returns (string [] memory names ) {
21+ names = new string [](0 );
22+ }
23+
24+ function freeze () internal override {
25+ freezes++ ;
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments