//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f. pragma solidity ^0.4.18; contract TestInteger { function testNegation() public pure returns(int8){ int8 x = 2**7-1; return -x; } function testNegation2() public pure returns(bool){ int8 x = -2**7; return -x==x; } function testBitNot() public pure returns(int256){ return ~int256(1); } function testBitNot2() public pure returns(uint256){ return ~uint256(0); } function testBitNot3() public pure returns(bytes){ int256 val = ~int256(0); bytes memory message = new bytes(32); for (uint j = 0; j < 32; j++) { message[j] = byte(bytes32(val << 8*j)); } return message; } function testMaxInt() public pure returns(uint256){ uint256 base=2; return base**256-1; } }
0.4.18