From 3afe73533355a8ae853732ae96b3f63583d07790 Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Tue, 21 Feb 2023 11:38:07 +0000 Subject: [PATCH] More cleanup and notes --- README.md | 2 ++ test/TicketNFT.t.sol | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index df26da9..9efc21e 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,5 @@ This is the skeleton for the coursework of the Principle of Distributed Ledgers It contains [the interfaces](./src/interfaces) of the contracts to implement and an [ERC20 implementation](./src/contracts/PurchaseToken.sol). The repository uses [Foundry](https://book.getfoundry.sh/projects/working-on-an-existing-project). + +Coverage generated using `forge coverage --report lcov && genhtml lcov.info -o coverage --branch-coverage --function-coverage --legend --title "TicketNFT Coverage"` diff --git a/test/TicketNFT.t.sol b/test/TicketNFT.t.sol index b8c4a68..84a6475 100644 --- a/test/TicketNFT.t.sol +++ b/test/TicketNFT.t.sol @@ -50,7 +50,7 @@ contract BaseTicketNFTTest is Test { nft = new TicketNFT(token); } - // Add Purchase Tokens to `recipient` to affort `amount` tickets + // Add Purchase Tokens to `recipient` to afford `amount` tickets function _topUpTokens(address recipient, uint256 amount) internal { vm.deal(recipient, amount * ticketPriceEth); vm.prank(recipient); @@ -135,7 +135,7 @@ contract TicketNFTTest is BaseTicketNFTTest { "transferFrom: msg.sender must be current holder or approved sender" ); nft.transferFrom(alice, bob, 1); - } // TODO: unnecessary? + } function testApproval() public { _buyTicket(alice, "alice"); @@ -335,7 +335,6 @@ contract PrimaryMarketTest is BaseTicketNFTTest { } } -// Use vm.warp to jump forward when testing expired tickets contract SecondaryMarketTest is BaseTicketNFTTest { function testList() public { _buyTicket(alice, "alice");