Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Max committed Feb 3, 2025
1 parent ade7585 commit 2975951
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/ units/ERC721.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Test} from "forge-std/Test.sol";
import {ERC721} from "src/ERC721.sol";

contract ERC721Test is Test {

ERC721 public erc721;

function setUp() public override {
erc721 = new ERC721();
}

function testERC721() public {
// Test ERC721
// Test supportsInterface
assertTrue(erc721.supportsInterface(type(IERC721).interfaceId));
assertTrue(erc721.supportsInterface(type(IERC165).interfaceId));
// Test balanceOf
assertEquals(erc721.balanceOf(address(this)), 0);
// Test ownerOf
assertEquals(erc721.ownerOf(0), address(0));
}
}

0 comments on commit 2975951

Please sign in to comment.