From cd8382d24f0e8a7d15494f97793bdefed949513b Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 2 Nov 2020 21:18:53 +0530 Subject: [PATCH] filename returned for testPass and testfailure --- libs/remix-tests/jest.config.js | 4 +- libs/remix-tests/src/testRunner.ts | 5 + .../tests/examples_1/simple_storage.sol | 2 +- .../tests/examples_1/simple_storage_test.sol | 2 +- .../tests/examples_2/simple_storage.sol | 2 +- .../tests/examples_2/simple_storage_test.sol | 2 +- .../tests/examples_3/simple_string.sol | 2 +- .../tests/examples_3/simple_string_test.sol | 2 +- .../remix-tests/tests/examples_4/SafeMath.sol | 2 +- .../tests/examples_4/SafeMathProxy.sol | 2 +- .../tests/examples_4/SafeMath_test.sol | 2 +- .../examples_5/contract/simple_storage.sol | 2 +- .../tests/examples_5/lib/EvenOdd.sol | 2 +- .../examples_5/test/simple_storage_test.sol | 2 +- libs/remix-tests/tests/number/number_test.sol | 2 +- libs/remix-tests/tests/testRunner.spec.ts | 106 +++++++++--------- 16 files changed, 73 insertions(+), 68 deletions(-) diff --git a/libs/remix-tests/jest.config.js b/libs/remix-tests/jest.config.js index 2662a3a2e6..7923ddf044 100644 --- a/libs/remix-tests/jest.config.js +++ b/libs/remix-tests/jest.config.js @@ -2,12 +2,12 @@ module.exports = { name: 'remix-tests', preset: '../../jest.config.js', verbose: true, - silent: true, // Silent console messages, specially the 'remix-simulator' ones + silent: false, // Silent console messages, specially the 'remix-simulator' ones transform: { '^.+\\.[tj]sx?$': 'ts-jest', }, rootDir: "./", - testTimeout: 30000, + testTimeout: 40000, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json'], // Coverage collectCoverage: true, diff --git a/libs/remix-tests/src/testRunner.ts b/libs/remix-tests/src/testRunner.ts index b6f62da199..1f08a25d18 100644 --- a/libs/remix-tests/src/testRunner.ts +++ b/libs/remix-tests/src/testRunner.ts @@ -250,6 +250,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com const resp: TestResultInterface = { type: 'testPass', value: changeCase.sentenceCase(func.name), + filename: testObject.filename, time: time, context: testName } @@ -260,6 +261,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com const resp: TestResultInterface = { type: 'testFailure', value: changeCase.sentenceCase(func.name), + filename: testObject.filename, time: time, errMsg: 'function returned false', context: testName @@ -298,6 +300,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com const resp: TestResultInterface = { type: 'testFailure', value: changeCase.sentenceCase(func.name), + filename: testObject.filename, time: time, errMsg: testEvent[1], context: testName, @@ -319,6 +322,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com const resp: TestResultInterface = { type: 'testPass', value: changeCase.sentenceCase(func.name), + filename: testObject.filename, time: time, context: testName } @@ -337,6 +341,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com const resp: TestResultInterface = { type: 'testFailure', value: changeCase.sentenceCase(func.name), + filename: testObject.filename, time: time, errMsg: err.message, context: testName diff --git a/libs/remix-tests/tests/examples_1/simple_storage.sol b/libs/remix-tests/tests/examples_1/simple_storage.sol index 402c9b8955..cbef58230b 100644 --- a/libs/remix-tests/tests/examples_1/simple_storage.sol +++ b/libs/remix-tests/tests/examples_1/simple_storage.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract SimpleStorage { uint public storedData; diff --git a/libs/remix-tests/tests/examples_1/simple_storage_test.sol b/libs/remix-tests/tests/examples_1/simple_storage_test.sol index 6e6518c7be..958788563a 100644 --- a/libs/remix-tests/tests/examples_1/simple_storage_test.sol +++ b/libs/remix-tests/tests/examples_1/simple_storage_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "./simple_storage.sol"; contract MyTest { diff --git a/libs/remix-tests/tests/examples_2/simple_storage.sol b/libs/remix-tests/tests/examples_2/simple_storage.sol index 7ce910b014..7ee2ffdc6d 100644 --- a/libs/remix-tests/tests/examples_2/simple_storage.sol +++ b/libs/remix-tests/tests/examples_2/simple_storage.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract SimpleStorage { uint public storedData; diff --git a/libs/remix-tests/tests/examples_2/simple_storage_test.sol b/libs/remix-tests/tests/examples_2/simple_storage_test.sol index 68efe17ac3..a0c3a0d6ca 100644 --- a/libs/remix-tests/tests/examples_2/simple_storage_test.sol +++ b/libs/remix-tests/tests/examples_2/simple_storage_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "./simple_storage.sol"; contract MyTest { diff --git a/libs/remix-tests/tests/examples_3/simple_string.sol b/libs/remix-tests/tests/examples_3/simple_string.sol index 6daed1d02a..1bc847f984 100644 --- a/libs/remix-tests/tests/examples_3/simple_string.sol +++ b/libs/remix-tests/tests/examples_3/simple_string.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract SimpleString { string public storedData; diff --git a/libs/remix-tests/tests/examples_3/simple_string_test.sol b/libs/remix-tests/tests/examples_3/simple_string_test.sol index a96582b735..3157f53c35 100644 --- a/libs/remix-tests/tests/examples_3/simple_string_test.sol +++ b/libs/remix-tests/tests/examples_3/simple_string_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "./simple_string.sol"; contract StringTest { diff --git a/libs/remix-tests/tests/examples_4/SafeMath.sol b/libs/remix-tests/tests/examples_4/SafeMath.sol index 8d262fb1f8..a93aedaf44 100644 --- a/libs/remix-tests/tests/examples_4/SafeMath.sol +++ b/libs/remix-tests/tests/examples_4/SafeMath.sol @@ -1,6 +1,6 @@ // Copyright (c) 2016 Smart Contract Solutions, Inc. -pragma solidity >=0.4.22 <0.7.0; +pragma solidity >=0.4.22 <0.8.0; /** diff --git a/libs/remix-tests/tests/examples_4/SafeMathProxy.sol b/libs/remix-tests/tests/examples_4/SafeMathProxy.sol index 502f5c2ccf..805c6d9112 100644 --- a/libs/remix-tests/tests/examples_4/SafeMathProxy.sol +++ b/libs/remix-tests/tests/examples_4/SafeMathProxy.sol @@ -1,4 +1,4 @@ -pragma solidity >=0.4.22 <0.7.0; +pragma solidity >=0.4.22 <0.8.0; import "./SafeMath.sol"; /* diff --git a/libs/remix-tests/tests/examples_4/SafeMath_test.sol b/libs/remix-tests/tests/examples_4/SafeMath_test.sol index 72be6b2f17..aa5112dc64 100644 --- a/libs/remix-tests/tests/examples_4/SafeMath_test.sol +++ b/libs/remix-tests/tests/examples_4/SafeMath_test.sol @@ -1,4 +1,4 @@ -pragma solidity >=0.4.22 <0.7.0; +pragma solidity >=0.4.22 <0.8.0; import "remix_tests.sol"; import "./SafeMath.sol"; import "./SafeMathProxy.sol"; diff --git a/libs/remix-tests/tests/examples_5/contract/simple_storage.sol b/libs/remix-tests/tests/examples_5/contract/simple_storage.sol index ec8d01ad2c..1cfbeb8f13 100644 --- a/libs/remix-tests/tests/examples_5/contract/simple_storage.sol +++ b/libs/remix-tests/tests/examples_5/contract/simple_storage.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "../../examples_4/SafeMath.sol"; import "../lib/EvenOdd.sol"; diff --git a/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol b/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol index eca275a7a7..a1536375a6 100644 --- a/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol +++ b/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract EvenOdd { diff --git a/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol b/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol index 4f472cf28a..c5ef812a61 100644 --- a/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol +++ b/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "./../contract/simple_storage.sol"; contract StorageResolveTest { diff --git a/libs/remix-tests/tests/number/number_test.sol b/libs/remix-tests/tests/number/number_test.sol index 9e62d01b9a..3bbfbc14f0 100644 --- a/libs/remix-tests/tests/number/number_test.sol +++ b/libs/remix-tests/tests/number/number_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract IntegerTest { diff --git a/libs/remix-tests/tests/testRunner.spec.ts b/libs/remix-tests/tests/testRunner.spec.ts index bb6fa6b449..593de29e8d 100644 --- a/libs/remix-tests/tests/testRunner.spec.ts +++ b/libs/remix-tests/tests/testRunner.spec.ts @@ -125,8 +125,8 @@ describe('testRunner', () => { deepEqualExcluding(tests, [ { type: 'accountList', value: accounts }, { type: 'contract', value: 'AssertOkTest', filename: __dirname + '/examples_0/assert_ok_test.sol' }, - { type: 'testPass', value: 'Ok pass test', context: 'AssertOkTest' }, - { type: 'testFailure', value: 'Ok fail test', errMsg: 'okFailTest fails', context: 'AssertOkTest', assertMethod: 'ok', location: '234:36:0', expected: 'true', returned: 'false'}, + { type: 'testPass', value: 'Ok pass test', filename: __dirname + '/examples_0/assert_ok_test.sol', context: 'AssertOkTest' }, + { type: 'testFailure', value: 'Ok fail test', filename: __dirname + '/examples_0/assert_ok_test.sol', errMsg: 'okFailTest fails', context: 'AssertOkTest', assertMethod: 'ok', location: '234:36:0', expected: 'true', returned: 'false'}, ], ['time']) }) @@ -155,18 +155,18 @@ describe('testRunner', () => { deepEqualExcluding(tests, [ { type: 'accountList', value: accounts }, { type: 'contract', value: 'AssertEqualTest', filename: __dirname + '/examples_0/assert_equal_test.sol' }, - { type: 'testPass', value: 'Equal uint pass test', context: 'AssertEqualTest' }, - { type: 'testFailure', value: 'Equal uint fail test', errMsg: 'equalUintFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '273:57:0', expected: '2', returned: '1'}, - { type: 'testPass', value: 'Equal int pass test', context: 'AssertEqualTest' }, - { type: 'testFailure', value: 'Equal int fail test', errMsg: 'equalIntFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '493:45:0', expected: '2', returned: '-1'}, - { type: 'testPass', value: 'Equal bool pass test', context: 'AssertEqualTest' }, - { type: 'testFailure', value: 'Equal bool fail test', errMsg: 'equalBoolFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '708:52:0', expected: false, returned: true}, - { type: 'testPass', value: 'Equal address pass test', context: 'AssertEqualTest' }, - { type: 'testFailure', value: 'Equal address fail test', errMsg: 'equalAddressFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '1015:130:0', expected: '0x1c6637567229159d1eFD45f95A6675e77727E013', returned: '0x7994f14563F39875a2F934Ce42cAbF48a93FdDA9'}, - { type: 'testPass', value: 'Equal bytes32 pass test', context: 'AssertEqualTest' }, - { type: 'testFailure', value: 'Equal bytes32 fail test', errMsg: 'equalBytes32FailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '1670:48:0', expected: '0x72656d6978000000000000000000000000000000000000000000000000000000', returned: '0x72656d6979000000000000000000000000000000000000000000000000000000'}, - { type: 'testPass', value: 'Equal string pass test', context: 'AssertEqualTest' }, - { type: 'testFailure', value: 'Equal string fail test', errMsg: 'equalStringFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '1916:81:0', expected: 'remix-tests', returned: 'remix'} + { type: 'testPass', value: 'Equal uint pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', context: 'AssertEqualTest' }, + { type: 'testFailure', value: 'Equal uint fail test', filename: __dirname + '/examples_0/assert_equal_test.sol', errMsg: 'equalUintFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '273:57:0', expected: '2', returned: '1'}, + { type: 'testPass', value: 'Equal int pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', context: 'AssertEqualTest' }, + { type: 'testFailure', value: 'Equal int fail test', filename: __dirname + '/examples_0/assert_equal_test.sol', errMsg: 'equalIntFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '493:45:0', expected: '2', returned: '-1'}, + { type: 'testPass', value: 'Equal bool pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', context: 'AssertEqualTest' }, + { type: 'testFailure', value: 'Equal bool fail test', filename: __dirname + '/examples_0/assert_equal_test.sol', errMsg: 'equalBoolFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '708:52:0', expected: false, returned: true}, + { type: 'testPass', value: 'Equal address pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', context: 'AssertEqualTest' }, + { type: 'testFailure', value: 'Equal address fail test', filename: __dirname + '/examples_0/assert_equal_test.sol', errMsg: 'equalAddressFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '1015:130:0', expected: '0x1c6637567229159d1eFD45f95A6675e77727E013', returned: '0x7994f14563F39875a2F934Ce42cAbF48a93FdDA9'}, + { type: 'testPass', value: 'Equal bytes32 pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', context: 'AssertEqualTest' }, + { type: 'testFailure', value: 'Equal bytes32 fail test', filename: __dirname + '/examples_0/assert_equal_test.sol', errMsg: 'equalBytes32FailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '1670:48:0', expected: '0x72656d6978000000000000000000000000000000000000000000000000000000', returned: '0x72656d6979000000000000000000000000000000000000000000000000000000'}, + { type: 'testPass', value: 'Equal string pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', context: 'AssertEqualTest' }, + { type: 'testFailure', value: 'Equal string fail test', filename: __dirname + '/examples_0/assert_equal_test.sol', errMsg: 'equalStringFailTest fails', context: 'AssertEqualTest', assertMethod: 'equal', location: '1916:81:0', expected: 'remix-tests', returned: 'remix'} ], ['time']) }) }) @@ -194,18 +194,18 @@ describe('testRunner', () => { deepEqualExcluding(tests, [ { type: 'accountList', value: accounts }, { type: 'contract', value: 'AssertNotEqualTest', filename: __dirname + '/examples_0/assert_notEqual_test.sol' }, - { type: 'testPass', value: 'Not equal uint pass test', context: 'AssertNotEqualTest' }, - { type: 'testFailure', value: 'Not equal uint fail test', errMsg: 'notEqualUintFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '288:63:0', expected: '1', returned: '1'}, - { type: 'testPass', value: 'Not equal int pass test', context: 'AssertNotEqualTest' }, - { type: 'testFailure', value: 'Not equal int fail test', errMsg: 'notEqualIntFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '525:52:0', expected: '-2', returned: '-2'}, - { type: 'testPass', value: 'Not equal bool pass test', context: 'AssertNotEqualTest' }, - { type: 'testFailure', value: 'Not equal bool fail test', errMsg: 'notEqualBoolFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '760:57:0', expected: true, returned: true}, - { type: 'testPass', value: 'Not equal address pass test', context: 'AssertNotEqualTest' }, - { type: 'testFailure', value: 'Not equal address fail test', errMsg: 'notEqualAddressFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '1084:136:0', expected: 0x7994f14563F39875a2F934Ce42cAbF48a93FdDA9, returned: 0x7994f14563F39875a2F934Ce42cAbF48a93FdDA9}, - { type: 'testPass', value: 'Not equal bytes32 pass test', context: 'AssertNotEqualTest' }, - { type: 'testFailure', value: 'Not equal bytes32 fail test', errMsg: 'notEqualBytes32FailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '1756:54:0', expected: '0x72656d6978000000000000000000000000000000000000000000000000000000', returned: '0x72656d6978000000000000000000000000000000000000000000000000000000'}, - { type: 'testPass', value: 'Not equal string pass test', context: 'AssertNotEqualTest' }, - { type: 'testFailure', value: 'Not equal string fail test', errMsg: 'notEqualStringFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '2026:81:0', expected: 'remix', returned: 'remix'}, + { type: 'testPass', value: 'Not equal uint pass test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', context: 'AssertNotEqualTest' }, + { type: 'testFailure', value: 'Not equal uint fail test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', errMsg: 'notEqualUintFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '288:63:0', expected: '1', returned: '1'}, + { type: 'testPass', value: 'Not equal int pass test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', context: 'AssertNotEqualTest' }, + { type: 'testFailure', value: 'Not equal int fail test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', errMsg: 'notEqualIntFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '525:52:0', expected: '-2', returned: '-2'}, + { type: 'testPass', value: 'Not equal bool pass test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', context: 'AssertNotEqualTest' }, + { type: 'testFailure', value: 'Not equal bool fail test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', errMsg: 'notEqualBoolFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '760:57:0', expected: true, returned: true}, + { type: 'testPass', value: 'Not equal address pass test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', context: 'AssertNotEqualTest' }, + { type: 'testFailure', value: 'Not equal address fail test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', errMsg: 'notEqualAddressFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '1084:136:0', expected: 0x7994f14563F39875a2F934Ce42cAbF48a93FdDA9, returned: 0x7994f14563F39875a2F934Ce42cAbF48a93FdDA9}, + { type: 'testPass', value: 'Not equal bytes32 pass test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', context: 'AssertNotEqualTest' }, + { type: 'testFailure', value: 'Not equal bytes32 fail test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', errMsg: 'notEqualBytes32FailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '1756:54:0', expected: '0x72656d6978000000000000000000000000000000000000000000000000000000', returned: '0x72656d6978000000000000000000000000000000000000000000000000000000'}, + { type: 'testPass', value: 'Not equal string pass test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', context: 'AssertNotEqualTest' }, + { type: 'testFailure', value: 'Not equal string fail test', filename: __dirname + '/examples_0/assert_notEqual_test.sol', errMsg: 'notEqualStringFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '2026:81:0', expected: 'remix', returned: 'remix'}, ], ['time']) }) }) @@ -232,14 +232,14 @@ describe('testRunner', () => { deepEqualExcluding(tests, [ { type: 'accountList', value: accounts }, { type: 'contract', value: 'AssertGreaterThanTest', filename: __dirname + '/examples_0/assert_greaterThan_test.sol' }, - { type: 'testPass', value: 'Greater than uint pass test', context: 'AssertGreaterThanTest' }, - { type: 'testFailure', value: 'Greater than uint fail test', errMsg: 'greaterThanUintFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '303:69:0', expected: '4', returned: '1'}, - { type: 'testPass', value: 'Greater than int pass test', context: 'AssertGreaterThanTest' }, - { type: 'testFailure', value: 'Greater than int fail test', errMsg: 'greaterThanIntFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '569:67:0', expected: '1', returned: '-1'}, - { type: 'testPass', value: 'Greater than uint int pass test', context: 'AssertGreaterThanTest' }, - { type: 'testFailure', value: 'Greater than uint int fail test', errMsg: 'greaterThanUintIntFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '845:71:0', expected: '2', returned: '1'}, - { type: 'testPass', value: 'Greater than int uint pass test', context: 'AssertGreaterThanTest' }, - { type: 'testFailure', value: 'Greater than int uint fail test', errMsg: 'greaterThanIntUintFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '1125:76:0', expected: '115792089237316195423570985008687907853269984665640564039457584007913129639836', returned: '100'} + { type: 'testPass', value: 'Greater than uint pass test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', context: 'AssertGreaterThanTest' }, + { type: 'testFailure', value: 'Greater than uint fail test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', errMsg: 'greaterThanUintFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '303:69:0', expected: '4', returned: '1'}, + { type: 'testPass', value: 'Greater than int pass test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', context: 'AssertGreaterThanTest' }, + { type: 'testFailure', value: 'Greater than int fail test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', errMsg: 'greaterThanIntFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '569:67:0', expected: '1', returned: '-1'}, + { type: 'testPass', value: 'Greater than uint int pass test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', context: 'AssertGreaterThanTest' }, + { type: 'testFailure', 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', value: 'Greater than int uint pass test', filename: __dirname + '/examples_0/assert_greaterThan_test.sol', context: 'AssertGreaterThanTest' }, + { type: 'testFailure', 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']) }) }) @@ -267,14 +267,14 @@ describe('testRunner', () => { deepEqualExcluding(tests, [ { type: 'accountList', value: accounts }, { type: 'contract', value: 'AssertLesserThanTest', filename: __dirname + '/examples_0/assert_lesserThan_test.sol' }, - { type: 'testPass', value: 'Lesser than uint pass test', context: 'AssertLesserThanTest' }, - { type: 'testFailure', value: 'Lesser than uint fail test', errMsg: 'lesserThanUintFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '298:67:0', expected: '2', returned: '4'}, - { type: 'testPass', value: 'Lesser than int pass test', context: 'AssertLesserThanTest' }, - { type: 'testFailure', value: 'Lesser than int fail test', errMsg: 'lesserThanIntFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '557:65:0', expected: '-1', returned: '1'}, - { type: 'testPass', value: 'Lesser than uint int pass test', context: 'AssertLesserThanTest' }, - { type: 'testFailure', value: 'Lesser than uint int fail test', errMsg: 'lesserThanUintIntFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '826:71:0', expected: '-1', returned: '115792089237316195423570985008687907853269984665640564039457584007913129639935'}, - { type: 'testPass', value: 'Lesser than int uint pass test', context: 'AssertLesserThanTest' }, - { type: 'testFailure', value: 'Lesser than int uint fail test', errMsg: 'lesserThanIntUintFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '1105:69:0', expected: '1', returned: '1'}, + { type: 'testPass', value: 'Lesser than uint pass test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', context: 'AssertLesserThanTest' }, + { type: 'testFailure', value: 'Lesser than uint fail test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', errMsg: 'lesserThanUintFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '298:67:0', expected: '2', returned: '4'}, + { type: 'testPass', value: 'Lesser than int pass test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', context: 'AssertLesserThanTest' }, + { type: 'testFailure', 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', value: 'Lesser than uint int pass test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', context: 'AssertLesserThanTest' }, + { type: 'testFailure', 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', value: 'Lesser than int uint pass test', filename: __dirname + '/examples_0/assert_lesserThan_test.sol', context: 'AssertLesserThanTest' }, + { type: 'testFailure', 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'}, ], ['time']) }) }) @@ -302,10 +302,10 @@ describe('testRunner', () => { deepEqualExcluding(tests, [ { type: 'accountList', value: accounts }, { type: 'contract', value: 'MyTest', filename: __dirname + '/examples_1/simple_storage_test.sol' }, - { type: 'testPass', value: 'Initial value should be100', context: 'MyTest' }, - { type: 'testPass', value: 'Initial value should not be200', context: 'MyTest' }, - { type: 'testFailure', value: 'Should trigger one fail', errMsg: 'uint test 1 fails', context: 'MyTest', assertMethod: 'equal', location: '532:51:1', expected: '2', returned: '1'}, - { type: 'testPass', value: 'Should trigger one pass', context: 'MyTest' } + { type: 'testPass', value: 'Initial value should be100', filename: __dirname + '/examples_1/simple_storage_test.sol', context: 'MyTest' }, + { type: 'testPass', value: 'Initial value should not be200', filename: __dirname + '/examples_1/simple_storage_test.sol', context: 'MyTest' }, + { type: 'testFailure', value: 'Should trigger one fail', filename: __dirname + '/examples_1/simple_storage_test.sol', errMsg: 'uint test 1 fails', context: 'MyTest', assertMethod: 'equal', location: '532:51:1', expected: '2', returned: '1'}, + { type: 'testPass', value: 'Should trigger one pass', filename: __dirname + '/examples_1/simple_storage_test.sol', context: 'MyTest' } ], ['time']) }) }) @@ -333,8 +333,8 @@ describe('testRunner', () => { deepEqualExcluding(tests, [ { type: 'accountList', value: accounts }, { type: 'contract', value: 'MyTest', filename: __dirname + '/examples_2/simple_storage_test.sol' }, - { type: 'testPass', value: 'Initial value should be100', context: 'MyTest' }, - { type: 'testPass', value: 'Value is set200', context: 'MyTest' } + { type: 'testPass', value: 'Initial value should be100', filename: __dirname + '/examples_2/simple_storage_test.sol', context: 'MyTest' }, + { type: 'testPass', value: 'Value is set200', filename: __dirname + '/examples_2/simple_storage_test.sol', context: 'MyTest' } ], ['time']) }) }) @@ -359,8 +359,8 @@ describe('testRunner', () => { deepEqualExcluding(tests, [ { type: 'accountList', value: accounts }, { type: 'contract', value: 'StringTest', filename: __dirname + '/examples_3/simple_string_test.sol' }, - { type: 'testPass', value: 'Initial value should be hello world', context: 'StringTest' }, - { type: 'testPass', value: 'Value should not be hello wordl', context: 'StringTest' } + { type: 'testPass', value: 'Initial value should be hello world', filename: __dirname + '/examples_3/simple_string_test.sol', context: 'StringTest' }, + { type: 'testPass', value: 'Value should not be hello wordl', filename: __dirname + '/examples_3/simple_string_test.sol', context: 'StringTest' } ], ['time']) }) }) @@ -385,9 +385,9 @@ describe('testRunner', () => { deepEqualExcluding(tests, [ { type: 'accountList', value: accounts }, { type: 'contract', value: 'StorageResolveTest', filename: __dirname + '/examples_5/test/simple_storage_test.sol' }, - { type: 'testPass', value: 'Initial value should be100', context: 'StorageResolveTest' }, - { type: 'testPass', value: 'Check if even', context: 'StorageResolveTest' }, - { type: 'testPass', value: 'Check if odd', context: 'StorageResolveTest' } + { type: 'testPass', value: 'Initial value should be100', filename: __dirname + '/examples_5/test/simple_storage_test.sol', context: 'StorageResolveTest' }, + { type: 'testPass', value: 'Check if even', filename: __dirname + '/examples_5/test/simple_storage_test.sol', context: 'StorageResolveTest' }, + { type: 'testPass', value: 'Check if odd', filename: __dirname + '/examples_5/test/simple_storage_test.sol', context: 'StorageResolveTest' } ], ['time']) }) })