Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 384 Bytes

fail.md

File metadata and controls

22 lines (16 loc) · 384 Bytes

fail

Signature

function fail(string memory err) internal virtual;

Description

Fail a test with a message if a certain branch or execution point is hit.

Examples

function test() external {
    for(uint256 place; place < 10; ++i){
        if(game.leaderboard(place) == address(this)) return;
    }
    fail("Not in the top 10.");
}