diff --git a/tests/examples_1/simple_storage_test.sol b/tests/examples_1/simple_storage_test.sol index 2bab305c4f..896970933f 100644 --- a/tests/examples_1/simple_storage_test.sol +++ b/tests/examples_1/simple_storage_test.sol @@ -1,5 +1,5 @@ pragma solidity ^0.4.7; -import "./tests.sol"; +import "remix_tests.sol"; import "./simple_storage.sol"; contract MyTest { @@ -19,5 +19,14 @@ contract MyTest { return foo.get() == 200; } + function shouldTriggerOneFail() public { + Assert.equal(uint(1), uint(2), "the test 1 fails"); + Assert.equal(uint(1), uint(2), "the test 2 fails"); + } + + function shouldTriggerOnePass() public { + Assert.equal(uint(1), uint(1), "the test 3 fails"); + } + } diff --git a/tests/testRunner.js b/tests/testRunner.js index d5529050d0..b6426f5ce5 100644 --- a/tests/testRunner.js +++ b/tests/testRunner.js @@ -43,16 +43,18 @@ describe('testRunner', function () { }) it('should 1 passing test', function () { - assert.equal(results.passingNum, 1) + assert.equal(results.passingNum, 2) }) it('should 1 failing test', function () { - assert.equal(results.failureNum, 1) + assert.equal(results.failureNum, 2) }) it('should returns 3 messages', function () { assert.deepEqual(tests, [ { type: 'contract', value: 'MyTest', filename: 'simple_storage_test.sol' }, + { type: 'testFailure', value: 'Should trigger one fail', time: 1, context: 'MyTest', errMsg: 'the test 1 fails' }, + { type: 'testPass', value: 'Should trigger one pass', time: 1, context: 'MyTest'}, { type: 'testPass', value: 'Initial value should be100', time: 1, context: 'MyTest' }, { type: 'testFailure', value: 'Initial value should be200', time: 1, context: 'MyTest', errMsg: 'function returned false' } ])