Merge pull request #1053 from LianaHus/origin/compileRenaming
fixes tests for solc-js 0.5.0pull/7/head
commit
e33ada1aa9
@ -1,12 +1,12 @@ |
|||||||
pragma solidity ^0.4.7; |
pragma solidity ^0.5.0; |
||||||
contract SimpleString { |
contract SimpleString { |
||||||
string public storedData; |
string public storedData; |
||||||
|
|
||||||
function SimpleString() public { |
constructor() public { |
||||||
storedData = "Hello world!"; |
storedData = "Hello world!"; |
||||||
} |
} |
||||||
|
|
||||||
function get() public view returns (string retVal) { |
function get() public view returns (string memory retVal) { |
||||||
return storedData; |
return storedData; |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,22 +1,22 @@ |
|||||||
pragma solidity ^0.4.7; |
pragma solidity ^0.5.0; |
||||||
import "./simple_string.sol"; |
import "./simple_string.sol"; |
||||||
|
|
||||||
contract StringTest { |
contract StringTest { |
||||||
SimpleString foo; |
SimpleString foo; |
||||||
|
|
||||||
function beforeAll() { |
function beforeAll() public { |
||||||
foo = new SimpleString(); |
foo = new SimpleString(); |
||||||
} |
} |
||||||
|
|
||||||
function initialValueShouldBeHello() public constant returns (bool) { |
function initialValueShouldBeHello() public returns (bool) { |
||||||
return Assert.equal(foo.get(), "Hello world!", "initial value is not correct"); |
return Assert.equal(foo.get(), "Hello world!", "initial value is not correct"); |
||||||
} |
} |
||||||
|
|
||||||
function valueShouldNotBeHelloWorld() public constant returns (bool) { |
function valueShouldNotBeHelloWorld() public returns (bool) { |
||||||
return Assert.notEqual(foo.get(), "Hello wordl!", "initial value is not correct"); |
return Assert.notEqual(foo.get(), "Hello wordl!", "initial value is not correct"); |
||||||
} |
} |
||||||
|
|
||||||
function valueShouldBeHelloWorld() public constant returns (bool) { |
function valueShouldBeHelloWorld() public returns (bool) { |
||||||
return Assert.equal(foo.get(), "Hello wordl!", "initial value is not correct"); |
return Assert.equal(foo.get(), "Hello wordl!", "initial value is not correct"); |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,38 +1,38 @@ |
|||||||
pragma solidity ^0.4.24; |
pragma solidity ^0.5.0; |
||||||
|
|
||||||
contract IntegerTest { |
contract IntegerTest { |
||||||
|
|
||||||
// GREATER THAN [>] tests |
// GREATER THAN [>] tests |
||||||
function _2_shouldBeGreaterThan_1() public constant returns (bool) { |
function _2_shouldBeGreaterThan_1() public returns (bool) { |
||||||
return Assert.greaterThan(uint(2), uint(1), "2 is greater than 1"); |
return Assert.greaterThan(uint(2), uint(1), "2 is greater than 1"); |
||||||
} |
} |
||||||
|
|
||||||
function _0_shouldBeGreaterThan_neg_1() public constant returns (bool) { |
function _0_shouldBeGreaterThan_neg_1() public returns (bool) { |
||||||
return Assert.greaterThan(uint(0), int(-1), "0 is greater than -1"); |
return Assert.greaterThan(uint(0), int(-1), "0 is greater than -1"); |
||||||
} |
} |
||||||
|
|
||||||
function _neg_1_shouldNotBeGreaterThan_1() public constant returns (bool) { |
function _neg_1_shouldNotBeGreaterThan_1() public returns (bool) { |
||||||
return Assert.greaterThan(int(-1), uint(1), "-1 is not greater than 1"); |
return Assert.greaterThan(int(-1), uint(1), "-1 is not greater than 1"); |
||||||
} |
} |
||||||
|
|
||||||
function _1_shouldBeGreaterThan_neg_1() public constant returns (bool) { |
function _1_shouldBeGreaterThan_neg_1() public returns (bool) { |
||||||
return Assert.greaterThan(uint(1), int(-1), "1 is greater than -1"); |
return Assert.greaterThan(uint(1), int(-1), "1 is greater than -1"); |
||||||
} |
} |
||||||
|
|
||||||
// LESSER THAN [<] tests |
// LESSER THAN [<] tests |
||||||
function _1_shouldBeLesserThan_2() public constant returns (bool) { |
function _1_shouldBeLesserThan_2() public returns (bool) { |
||||||
return Assert.lesserThan(uint(1), uint(2), "1 is lesser than 2"); |
return Assert.lesserThan(uint(1), uint(2), "1 is lesser than 2"); |
||||||
} |
} |
||||||
|
|
||||||
function _neg_1_shouldBeLesserThan_0() public constant returns (bool) { |
function _neg_1_shouldBeLesserThan_0() public returns (bool) { |
||||||
return Assert.lesserThan(int(-1), uint(0), "-1 is lesser than 0"); |
return Assert.lesserThan(int(-1), uint(0), "-1 is lesser than 0"); |
||||||
} |
} |
||||||
|
|
||||||
function _neg_2_shouldBeLesserThan_neg_1() public constant returns (bool) { |
function _neg_2_shouldBeLesserThan_neg_1() public returns (bool) { |
||||||
return Assert.lesserThan(int(-2), int(-1), "-2 is lesser than -1"); |
return Assert.lesserThan(int(-2), int(-1), "-2 is lesser than -1"); |
||||||
} |
} |
||||||
|
|
||||||
function _0_shouldNotBeLesserThan_neg_1() public constant returns (bool) { |
function _0_shouldNotBeLesserThan_neg_1() public returns (bool) { |
||||||
return Assert.lesserThan(uint(0), int(-1), "0 is not lesser than -1"); |
return Assert.lesserThan(uint(0), int(-1), "0 is not lesser than -1"); |
||||||
} |
} |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue