Before I did anything serious I just wanted to check the toolchain is working. I wrote a test like this:
pragma solidity ^0.4.2;
import "truffle/Assert.sol";
import "truffle/DeployedAddresses.sol";
import "../contracts/MyContract.sol";
contract TestMyContract {
function testOneEqualsOne() {
Assert.equal(1, 1, "The world as we know it has ended!");
}
}
But it produces an error:
TestMyContract.sol:10:5: : Member "equal" not unique after argument-dependent lookup in type(library Assert)
Assert.equal(1, 1, "The world as we know it has ended!");
^----------^
What's going on?
The sample test, which are created via truffle init
all work perfectly:
uint expected = 10000;
Assert.equal(meta.getBalance(tx.origin), expected, "Owner should have 10000 MetaCoin initially");
And even with the arguments reversed:
Assert.equal(expected, meta.getBalance(tx.origin), "Owner should have 10000 MetaCoin initially");