diff --git a/libs/remix-tests/tests/examples_0/assert_greaterThan_test.sol b/libs/remix-tests/tests/examples_0/assert_greaterThan_test.sol index 0dab742ea0..529c78106c 100644 --- a/libs/remix-tests/tests/examples_0/assert_greaterThan_test.sol +++ b/libs/remix-tests/tests/examples_0/assert_greaterThan_test.sol @@ -29,8 +29,4 @@ contract AssertGreaterThanTest { function greaterThanIntUintPassTest() public { Assert.greaterThan(int(10), uint(2), "greaterThanIntUintPassTest passes"); } - - function greaterThanIntUintFailTest() public { - Assert.greaterThan(int(100), uint(-100), "greaterThanIntUintFailTest fails"); - } } \ No newline at end of file diff --git a/libs/remix-tests/tests/examples_0/assert_lesserThan_test.sol b/libs/remix-tests/tests/examples_0/assert_lesserThan_test.sol index f6468ec952..9c36a6fe04 100644 --- a/libs/remix-tests/tests/examples_0/assert_lesserThan_test.sol +++ b/libs/remix-tests/tests/examples_0/assert_lesserThan_test.sol @@ -22,14 +22,6 @@ contract AssertLesserThanTest { Assert.lesserThan(uint(1), int(2), "lesserThanUintIntPassTest passes"); } - function lesserThanUintIntFailTest() public { - Assert.lesserThan(uint(-1), int(-1), "lesserThanUintIntFailTest fails"); - } - - function lesserThanIntUintPassTest() public { - Assert.lesserThan(int(100), uint(-50), "lesserThanIntUintPassTest passes"); - } - function lesserThanIntUintFailTest() public { Assert.lesserThan(int(1), uint(1), "lesserThanIntUintFailTest fails"); } diff --git a/libs/remix-tests/tests/examples_4/SafeMath_test.sol b/libs/remix-tests/tests/examples_4/SafeMath_test.sol index 87d19292a9..6582baa10c 100644 --- a/libs/remix-tests/tests/examples_4/SafeMath_test.sol +++ b/libs/remix-tests/tests/examples_4/SafeMath_test.sol @@ -10,15 +10,15 @@ contract SafeMathTest { safemathproxy = new SafeMathProxy(); } - function unsafeMultiplicationShouldOverflow() public returns (bool) { - uint256 a = 4; - uint256 b = 2 ** 256 - 1; - return Assert.equal( - a * b, - 2 ** 256 - 4, - "unsafe multiplication did not overflow" - ); - } + // function unsafeMultiplicationShouldOverflow() public returns (bool) { + // uint256 a = 4; + // uint256 b = 2 ** 256 - 1; + // return Assert.equal( + // a * b, + // 2 ** 256 - 4, + // "unsafe multiplication did not overflow" + // ); + // } function safeMultiplicationShouldRevert() public returns (bool) { uint256 a = 4; @@ -42,15 +42,15 @@ contract SafeMathTest { ); } - function unsafeSubtractShouldUnderflow() public returns (bool) { - uint256 a = 0; - uint256 b = a - 1; - return Assert.equal( - b, - 2 ** 256 - 1, - "unsafe subtraction did not underflow" - ); - } + // function unsafeSubtractShouldUnderflow() public returns (bool) { + // uint256 a = 0; + // uint256 b = a - 1; + // return Assert.equal( + // b, + // 2 ** 256 - 1, + // "unsafe subtraction did not underflow" + // ); + // } function safeSubtractShouldRevert() public returns (bool) { (bool success, bytes memory data) = address(safemathproxy).call{gas:40000, value:0}(abi.encode("subProxy, [0, 1]")); @@ -77,11 +77,11 @@ contract SafeMathTest { } } - function unsafeAdditionShouldOverflow() public returns (bool) { - uint256 a = 1; - uint256 b = 2 ** 256 - 1; - return Assert.equal(a + b, 0, "unsafe addition did not overflow"); - } + // function unsafeAdditionShouldOverflow() public returns (bool) { + // uint256 a = 1; + // uint256 b = 2 ** 256 - 1; + // return Assert.equal(a + b, 0, "unsafe addition did not overflow"); + // } function safeAdditionShouldRevert() public returns (bool) { uint256 a = 1; diff --git a/libs/remix-tests/tests/testRunner.spec.ts b/libs/remix-tests/tests/testRunner.spec.ts index 0d2dcf260d..3da24b5acd 100644 --- a/libs/remix-tests/tests/testRunner.spec.ts +++ b/libs/remix-tests/tests/testRunner.spec.ts @@ -230,8 +230,8 @@ describe('testRunner', function () { assert.equal(results.passingNum, 4) }) - it('should have 4 failing test', () => { - assert.equal(results.failureNum, 4) + it('should have 3 failing test', () => { + assert.equal(results.failureNum, 3) }) it('should return', () => { deepEqualExcluding(tests, [ @@ -244,7 +244,6 @@ describe('testRunner', function () { { type: 'testPass', debugTxHash: '0xf52652ef6020ae091022455df8713d20cb00a35de8bf485e177128a457a50d6c', value: 'Greater than uint int pass test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', context: 'AssertGreaterThanTest' }, { type: 'testFailure', debugTxHash: '0x9f826060a0e5a8c0187d5e9ffe83a153080379a1e1fea0b267745eb8bd52fd6f', value: 'Greater than uint int fail test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', errMsg: 'greaterThanUintIntFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '845:71:0', expected: '2', returned: '1' }, { type: 'testPass', debugTxHash: '0x04e1703c75cc4beb4b8c9ddfb79489192423fe745089382cadb1811cbf2d915c', value: 'Greater than int uint pass test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', context: 'AssertGreaterThanTest' }, - { type: 'testFailure', debugTxHash: '0xbb5c94a5fc46417a4d3c763994da78d4f27c83dbc5545cb0522a39c3c6017432', value: 'Greater than int uint fail test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', errMsg: 'greaterThanIntUintFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '1125:76:0', expected: '115792089237316195423570985008687907853269984665640564039457584007913129639836', returned: '100' } ], ['time', 'web3']) }) }) @@ -260,12 +259,12 @@ describe('testRunner', function () { after(() => { tests = [] }) - it('should have 4 passing test', () => { - assert.equal(results.passingNum, 4) + it('should have 3 passing test', () => { + assert.equal(results.passingNum, 3) }) - it('should have 4 failing test', () => { - assert.equal(results.failureNum, 4) + it('should have 3 failing test', () => { + assert.equal(results.failureNum, 3) }) it('should return', () => { @@ -277,9 +276,7 @@ describe('testRunner', function () { { type: 'testPass', debugTxHash: '0x353c9bcf4b61abaf4b6ffaae02f18ea0a7fb38a8c3c7a915939561cdf97f2d72', value: 'Lesser than int pass test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', context: 'AssertLesserThanTest' }, { type: 'testFailure', debugTxHash: '0xccab30c5a154c4c2e8ca9a8966b86a55f08188d606c3519a5c29534b4b64fb47', value: 'Lesser than int fail test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', errMsg: 'lesserThanIntFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '557:65:0', expected: '-1', returned: '1' }, { type: 'testPass', debugTxHash: '0x8e90fb7f3b8343d037444275cd69d431f75a7fc6b46322c69397373463cee22a', value: 'Lesser than uint int pass test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', context: 'AssertLesserThanTest' }, - { type: 'testFailure', debugTxHash: '0x5db60fe115958b767f0defe81eeb6322ee18ec8df690abad0d1581175882136b', value: 'Lesser than uint int fail test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', errMsg: 'lesserThanUintIntFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '826:71:0', expected: '-1', returned: '115792089237316195423570985008687907853269984665640564039457584007913129639935' }, - { type: 'testPass', debugTxHash: '0x19f79e8c8ec360cd27beee6399e6853a4fe335af78364ed35c93f8fe39e3100c', value: 'Lesser than int uint pass test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', context: 'AssertLesserThanTest' }, - { type: 'testFailure', debugTxHash: '0x520ecba457bf71f42d24f61432d872121da699af0374090e2e9098a6719cb0ce', value: 'Lesser than int uint fail test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', errMsg: 'lesserThanIntUintFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '1105:69:0', expected: '1', returned: '1' }, + { type: 'testFailure', debugTxHash: '0x7912b2535fe0f5a56b274a7ec5ef6dbb0f52a7199f11831867a98961568f2883', value: 'Lesser than int uint fail test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', errMsg: 'lesserThanIntUintFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '826:69:0', expected: '1', returned: '1' }, ], ['time', 'web3']) }) }) @@ -409,8 +406,8 @@ describe('testRunner', function () { after(() => { tests = [] }) - it('should have 10 passing tests', () => { - assert.equal(results.passingNum, 10) + it('should have 7 passing tests', () => { + assert.equal(results.passingNum, 7) }) it('should have 0 failing tests', () => { assert.equal(results.failureNum, 0)