filename returned for testPass and testfailure

pull/5370/head
aniket-engg 4 years ago committed by Aniket
parent b89b545f6a
commit cd8382d24f
  1. 4
      libs/remix-tests/jest.config.js
  2. 5
      libs/remix-tests/src/testRunner.ts
  3. 2
      libs/remix-tests/tests/examples_1/simple_storage.sol
  4. 2
      libs/remix-tests/tests/examples_1/simple_storage_test.sol
  5. 2
      libs/remix-tests/tests/examples_2/simple_storage.sol
  6. 2
      libs/remix-tests/tests/examples_2/simple_storage_test.sol
  7. 2
      libs/remix-tests/tests/examples_3/simple_string.sol
  8. 2
      libs/remix-tests/tests/examples_3/simple_string_test.sol
  9. 2
      libs/remix-tests/tests/examples_4/SafeMath.sol
  10. 2
      libs/remix-tests/tests/examples_4/SafeMathProxy.sol
  11. 2
      libs/remix-tests/tests/examples_4/SafeMath_test.sol
  12. 2
      libs/remix-tests/tests/examples_5/contract/simple_storage.sol
  13. 2
      libs/remix-tests/tests/examples_5/lib/EvenOdd.sol
  14. 2
      libs/remix-tests/tests/examples_5/test/simple_storage_test.sol
  15. 2
      libs/remix-tests/tests/number/number_test.sol
  16. 106
      libs/remix-tests/tests/testRunner.spec.ts

@ -2,12 +2,12 @@ module.exports = {
name: 'remix-tests', name: 'remix-tests',
preset: '../../jest.config.js', preset: '../../jest.config.js',
verbose: true, verbose: true,
silent: true, // Silent console messages, specially the 'remix-simulator' ones silent: false, // Silent console messages, specially the 'remix-simulator' ones
transform: { transform: {
'^.+\\.[tj]sx?$': 'ts-jest', '^.+\\.[tj]sx?$': 'ts-jest',
}, },
rootDir: "./", rootDir: "./",
testTimeout: 30000, testTimeout: 40000,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json'],
// Coverage // Coverage
collectCoverage: true, collectCoverage: true,

@ -250,6 +250,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
const resp: TestResultInterface = { const resp: TestResultInterface = {
type: 'testPass', type: 'testPass',
value: changeCase.sentenceCase(func.name), value: changeCase.sentenceCase(func.name),
filename: testObject.filename,
time: time, time: time,
context: testName context: testName
} }
@ -260,6 +261,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
const resp: TestResultInterface = { const resp: TestResultInterface = {
type: 'testFailure', type: 'testFailure',
value: changeCase.sentenceCase(func.name), value: changeCase.sentenceCase(func.name),
filename: testObject.filename,
time: time, time: time,
errMsg: 'function returned false', errMsg: 'function returned false',
context: testName context: testName
@ -298,6 +300,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
const resp: TestResultInterface = { const resp: TestResultInterface = {
type: 'testFailure', type: 'testFailure',
value: changeCase.sentenceCase(func.name), value: changeCase.sentenceCase(func.name),
filename: testObject.filename,
time: time, time: time,
errMsg: testEvent[1], errMsg: testEvent[1],
context: testName, context: testName,
@ -319,6 +322,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
const resp: TestResultInterface = { const resp: TestResultInterface = {
type: 'testPass', type: 'testPass',
value: changeCase.sentenceCase(func.name), value: changeCase.sentenceCase(func.name),
filename: testObject.filename,
time: time, time: time,
context: testName context: testName
} }
@ -337,6 +341,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
const resp: TestResultInterface = { const resp: TestResultInterface = {
type: 'testFailure', type: 'testFailure',
value: changeCase.sentenceCase(func.name), value: changeCase.sentenceCase(func.name),
filename: testObject.filename,
time: time, time: time,
errMsg: err.message, errMsg: err.message,
context: testName context: testName

@ -1,4 +1,4 @@
pragma solidity >= 0.5.0 < 0.7.0; pragma solidity >= 0.5.0 < 0.8.0;
contract SimpleStorage { contract SimpleStorage {
uint public storedData; uint public storedData;

@ -1,4 +1,4 @@
pragma solidity >= 0.5.0 < 0.7.0; pragma solidity >= 0.5.0 < 0.8.0;
import "./simple_storage.sol"; import "./simple_storage.sol";
contract MyTest { contract MyTest {

@ -1,4 +1,4 @@
pragma solidity >= 0.5.0 < 0.7.0; pragma solidity >= 0.5.0 < 0.8.0;
contract SimpleStorage { contract SimpleStorage {
uint public storedData; uint public storedData;

@ -1,4 +1,4 @@
pragma solidity >= 0.5.0 < 0.7.0; pragma solidity >= 0.5.0 < 0.8.0;
import "./simple_storage.sol"; import "./simple_storage.sol";
contract MyTest { contract MyTest {

@ -1,4 +1,4 @@
pragma solidity >= 0.5.0 < 0.7.0; pragma solidity >= 0.5.0 < 0.8.0;
contract SimpleString { contract SimpleString {
string public storedData; string public storedData;

@ -1,4 +1,4 @@
pragma solidity >= 0.5.0 < 0.7.0; pragma solidity >= 0.5.0 < 0.8.0;
import "./simple_string.sol"; import "./simple_string.sol";
contract StringTest { contract StringTest {

@ -1,6 +1,6 @@
// Copyright (c) 2016 Smart Contract Solutions, Inc. // Copyright (c) 2016 Smart Contract Solutions, Inc.
pragma solidity >=0.4.22 <0.7.0; pragma solidity >=0.4.22 <0.8.0;
/** /**

@ -1,4 +1,4 @@
pragma solidity >=0.4.22 <0.7.0; pragma solidity >=0.4.22 <0.8.0;
import "./SafeMath.sol"; import "./SafeMath.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 "remix_tests.sol";
import "./SafeMath.sol"; import "./SafeMath.sol";
import "./SafeMathProxy.sol"; import "./SafeMathProxy.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 "../../examples_4/SafeMath.sol";
import "../lib/EvenOdd.sol"; import "../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 { contract EvenOdd {

@ -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"; import "./../contract/simple_storage.sol";
contract StorageResolveTest { contract StorageResolveTest {

@ -1,4 +1,4 @@
pragma solidity >= 0.5.0 < 0.7.0; pragma solidity >= 0.5.0 < 0.8.0;
contract IntegerTest { contract IntegerTest {

@ -125,8 +125,8 @@ describe('testRunner', () => {
deepEqualExcluding(tests, [ deepEqualExcluding(tests, [
{ type: 'accountList', value: accounts }, { type: 'accountList', value: accounts },
{ type: 'contract', value: 'AssertOkTest', filename: __dirname + '/examples_0/assert_ok_test.sol' }, { type: 'contract', value: 'AssertOkTest', filename: __dirname + '/examples_0/assert_ok_test.sol' },
{ type: 'testPass', value: 'Ok pass test', context: 'AssertOkTest' }, { type: 'testPass', value: 'Ok pass test', filename: __dirname + '/examples_0/assert_ok_test.sol', context: 'AssertOkTest' },
{ type: 'testFailure', value: 'Ok fail test', errMsg: 'okFailTest fails', context: 'AssertOkTest', assertMethod: 'ok', location: '234:36:0', expected: 'true', returned: 'false'}, { 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']) ], ['time'])
}) })
@ -155,18 +155,18 @@ describe('testRunner', () => {
deepEqualExcluding(tests, [ deepEqualExcluding(tests, [
{ type: 'accountList', value: accounts }, { type: 'accountList', value: accounts },
{ type: 'contract', value: 'AssertEqualTest', filename: __dirname + '/examples_0/assert_equal_test.sol' }, { type: 'contract', value: 'AssertEqualTest', filename: __dirname + '/examples_0/assert_equal_test.sol' },
{ type: 'testPass', value: 'Equal uint pass test', context: 'AssertEqualTest' }, { type: 'testPass', value: 'Equal uint pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', 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: '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', context: 'AssertEqualTest' }, { type: 'testPass', value: 'Equal int pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', 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: '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', context: 'AssertEqualTest' }, { type: 'testPass', value: 'Equal bool pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', 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: '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', context: 'AssertEqualTest' }, { type: 'testPass', value: 'Equal address pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', 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: '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', context: 'AssertEqualTest' }, { type: 'testPass', value: 'Equal bytes32 pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', 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: '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', context: 'AssertEqualTest' }, { type: 'testPass', value: 'Equal string pass test', filename: __dirname + '/examples_0/assert_equal_test.sol', 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: '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']) ], ['time'])
}) })
}) })
@ -194,18 +194,18 @@ describe('testRunner', () => {
deepEqualExcluding(tests, [ deepEqualExcluding(tests, [
{ type: 'accountList', value: accounts }, { type: 'accountList', value: accounts },
{ type: 'contract', value: 'AssertNotEqualTest', filename: __dirname + '/examples_0/assert_notEqual_test.sol' }, { type: 'contract', value: 'AssertNotEqualTest', filename: __dirname + '/examples_0/assert_notEqual_test.sol' },
{ type: 'testPass', value: 'Not equal uint pass test', context: 'AssertNotEqualTest' }, { 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', errMsg: 'notEqualUintFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '288:63:0', expected: '1', returned: '1'}, { 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', context: 'AssertNotEqualTest' }, { 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', errMsg: 'notEqualIntFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '525:52:0', expected: '-2', returned: '-2'}, { 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', context: 'AssertNotEqualTest' }, { 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', errMsg: 'notEqualBoolFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '760:57:0', expected: true, returned: true}, { 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', context: 'AssertNotEqualTest' }, { 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', errMsg: 'notEqualAddressFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '1084:136:0', expected: 0x7994f14563F39875a2F934Ce42cAbF48a93FdDA9, returned: 0x7994f14563F39875a2F934Ce42cAbF48a93FdDA9}, { 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', context: 'AssertNotEqualTest' }, { 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', errMsg: 'notEqualBytes32FailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '1756:54:0', expected: '0x72656d6978000000000000000000000000000000000000000000000000000000', returned: '0x72656d6978000000000000000000000000000000000000000000000000000000'}, { 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', context: 'AssertNotEqualTest' }, { 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', errMsg: 'notEqualStringFailTest fails', context: 'AssertNotEqualTest', assertMethod: 'notEqual', location: '2026:81:0', expected: 'remix', returned: 'remix'}, { 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']) ], ['time'])
}) })
}) })
@ -232,14 +232,14 @@ describe('testRunner', () => {
deepEqualExcluding(tests, [ deepEqualExcluding(tests, [
{ type: 'accountList', value: accounts }, { type: 'accountList', value: accounts },
{ type: 'contract', value: 'AssertGreaterThanTest', filename: __dirname + '/examples_0/assert_greaterThan_test.sol' }, { type: 'contract', value: 'AssertGreaterThanTest', filename: __dirname + '/examples_0/assert_greaterThan_test.sol' },
{ type: 'testPass', value: 'Greater than uint pass test', context: 'AssertGreaterThanTest' }, { 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', errMsg: 'greaterThanUintFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '303:69:0', expected: '4', returned: '1'}, { 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', context: 'AssertGreaterThanTest' }, { 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', errMsg: 'greaterThanIntFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '569:67:0', expected: '1', returned: '-1'}, { 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', context: 'AssertGreaterThanTest' }, { 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', errMsg: 'greaterThanUintIntFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '845:71:0', expected: '2', returned: '1'}, { 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', context: 'AssertGreaterThanTest' }, { 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', errMsg: 'greaterThanIntUintFailTest fails', context: 'AssertGreaterThanTest', assertMethod: 'greaterThan', location: '1125:76:0', expected: '115792089237316195423570985008687907853269984665640564039457584007913129639836', returned: '100'} { 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']) ], ['time'])
}) })
}) })
@ -267,14 +267,14 @@ describe('testRunner', () => {
deepEqualExcluding(tests, [ deepEqualExcluding(tests, [
{ type: 'accountList', value: accounts }, { type: 'accountList', value: accounts },
{ type: 'contract', value: 'AssertLesserThanTest', filename: __dirname + '/examples_0/assert_lesserThan_test.sol' }, { type: 'contract', value: 'AssertLesserThanTest', filename: __dirname + '/examples_0/assert_lesserThan_test.sol' },
{ type: 'testPass', value: 'Lesser than uint pass test', context: 'AssertLesserThanTest' }, { 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', errMsg: 'lesserThanUintFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '298:67:0', expected: '2', returned: '4'}, { 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', context: 'AssertLesserThanTest' }, { 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', errMsg: 'lesserThanIntFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '557:65:0', expected: '-1', returned: '1'}, { 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', context: 'AssertLesserThanTest' }, { 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', errMsg: 'lesserThanUintIntFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '826:71:0', expected: '-1', returned: '115792089237316195423570985008687907853269984665640564039457584007913129639935'}, { 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', context: 'AssertLesserThanTest' }, { 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', errMsg: 'lesserThanIntUintFailTest fails', context: 'AssertLesserThanTest', assertMethod: 'lesserThan', location: '1105:69:0', expected: '1', returned: '1'}, { 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']) ], ['time'])
}) })
}) })
@ -302,10 +302,10 @@ describe('testRunner', () => {
deepEqualExcluding(tests, [ deepEqualExcluding(tests, [
{ type: 'accountList', value: accounts }, { type: 'accountList', value: accounts },
{ type: 'contract', value: 'MyTest', filename: __dirname + '/examples_1/simple_storage_test.sol' }, { 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 be100', filename: __dirname + '/examples_1/simple_storage_test.sol', context: 'MyTest' },
{ type: 'testPass', value: 'Initial value should not be200', 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', errMsg: 'uint test 1 fails', context: 'MyTest', assertMethod: 'equal', location: '532:51:1', expected: '2', returned: '1'}, { 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', context: 'MyTest' } { type: 'testPass', value: 'Should trigger one pass', filename: __dirname + '/examples_1/simple_storage_test.sol', context: 'MyTest' }
], ['time']) ], ['time'])
}) })
}) })
@ -333,8 +333,8 @@ describe('testRunner', () => {
deepEqualExcluding(tests, [ deepEqualExcluding(tests, [
{ type: 'accountList', value: accounts }, { type: 'accountList', value: accounts },
{ type: 'contract', value: 'MyTest', filename: __dirname + '/examples_2/simple_storage_test.sol' }, { type: 'contract', value: 'MyTest', filename: __dirname + '/examples_2/simple_storage_test.sol' },
{ type: 'testPass', value: 'Initial value should be100', 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', context: 'MyTest' } { type: 'testPass', value: 'Value is set200', filename: __dirname + '/examples_2/simple_storage_test.sol', context: 'MyTest' }
], ['time']) ], ['time'])
}) })
}) })
@ -359,8 +359,8 @@ describe('testRunner', () => {
deepEqualExcluding(tests, [ deepEqualExcluding(tests, [
{ type: 'accountList', value: accounts }, { type: 'accountList', value: accounts },
{ type: 'contract', value: 'StringTest', filename: __dirname + '/examples_3/simple_string_test.sol' }, { 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: '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', context: 'StringTest' } { type: 'testPass', value: 'Value should not be hello wordl', filename: __dirname + '/examples_3/simple_string_test.sol', context: 'StringTest' }
], ['time']) ], ['time'])
}) })
}) })
@ -385,9 +385,9 @@ describe('testRunner', () => {
deepEqualExcluding(tests, [ deepEqualExcluding(tests, [
{ type: 'accountList', value: accounts }, { type: 'accountList', value: accounts },
{ type: 'contract', value: 'StorageResolveTest', filename: __dirname + '/examples_5/test/simple_storage_test.sol' }, { 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: 'Initial value should be100', filename: __dirname + '/examples_5/test/simple_storage_test.sol', context: 'StorageResolveTest' },
{ type: 'testPass', value: 'Check if even', 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', context: 'StorageResolveTest' } { type: 'testPass', value: 'Check if odd', filename: __dirname + '/examples_5/test/simple_storage_test.sol', context: 'StorageResolveTest' }
], ['time']) ], ['time'])
}) })
}) })

Loading…
Cancel
Save