- Scope
- HelloWorld.sol
- Tools
The answer is explicitly provided in the constructor.
constructor() {
- _answer = keccak256(abi.encodePacked("HelloWorld"));
}
function testCorrectAnswer() public {
HelloWorld h = base.helloWorld();
h.answer("HelloWorld");
console.log("success: ",h.success());
base.solve();
assertTrue(base.isSolved());
}
Results
[PASS] testCorrectAnswer() (gas: 61543)
Logs:
success: true