From 9a7fbec3cb262f7f9200b04a91c3e4033c9f2c8b Mon Sep 17 00:00:00 2001 From: adjoly Date: Thu, 24 Jul 2025 15:31:54 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=9A=A7=E3=80=8D=20test:=20testin?= =?UTF-8?q?g=20things,=20might=20broke.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/contract/main.sol | 8 +++++++- test/main.t.sol | 13 +++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 test/main.t.sol diff --git a/src/contract/main.sol b/src/contract/main.sol index aa644f3..4f400ad 100644 --- a/src/contract/main.sol +++ b/src/contract/main.sol @@ -2,4 +2,10 @@ pragma solidity ^0.8; -contract scoreStore {} +contract scoreStore { + uint16 test = 0; + + function up(uint16 plus) public { + test += plus; + } +} diff --git a/test/main.t.sol b/test/main.t.sol new file mode 100644 index 0000000..bb58846 --- /dev/null +++ b/test/main.t.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8; + +import "src/contract/main.sol"; +import "forge-std/Test.sol"; + +contract mainTest is Test, scoreStore { + function testUp() public { + up(2); + assertEq(test, 2); + } +}