I am trying to run test cases in sol-unit
for Solidity, but when I compile my code with solc
compiler I get an error. I don't think the error is critical, but there is very little material on net about it:
demotest.sol:13:9: Error: Member "assertNotEqual" not found or not visible
after argument-dependent lookup in uint256
demo.getX().assertNotEqual(TEST_VAL, "Values are not equal");
contract Demo { uint _x = 0; function setX(uint x){ _x = x; } function getX() constant returns (uint x){ return _x; } }
import "./Demo.sol"; contract DemoTest is Demo { uint constant TEST_VAL = 55; // Test method starts with 'test' and will thus be recognized (2). function testSetX(){ Demo demo = new Demo(); demo.setX(TEST_VAL); // Assert methods bound to type. Assertions will automatically fire off a test event (3). demo.getX().assertNotEqual(TEST_VAL, "Values are not equal"); } }