Skip to content

Instantly share code, notes, and snippets.

@aakilfernandes
Created January 22, 2019 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aakilfernandes/48e8415e6cd8f10695fc1cb8b71af74c to your computer and use it in GitHub Desktop.
Save aakilfernandes/48e8415e6cd8f10695fc1cb8b71af74c to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=false&gist=
contract PseudoErc721 {
public function sunsetLength(uint256) returns (uint256)
}
pragma solidity ^0.4.7;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "./ballot.sol";
contract test3 {
Ballot ballotToTest;
function beforeAll () {
ballotToTest = new Ballot(2);
}
function checkWinningProposal () public {
ballotToTest.vote(1);
Assert.equal(ballotToTest.winningProposal(), uint(1), "1 should be the winning proposal");
}
function checkWinninProposalWithReturnValue () public constant returns (bool) {
return ballotToTest.winningProposal() == 1;
}
}
pragma solidity ^0.4.24;
contract UnderflowCheck {
uint256 public value;
constructor(uint256 _value) public {
require(_value >= 0);
value = _value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment