diff --git a/tests/examples_3/simple_string_test.sol b/tests/examples_3/simple_string_test.sol index 4f8109764a..270c2719b8 100644 --- a/tests/examples_3/simple_string_test.sol +++ b/tests/examples_3/simple_string_test.sol @@ -13,6 +13,10 @@ contract StringTest { return Assert.equal(foo.get(), "Hello world!", "initial value is not correct"); } + function valueShouldNotBeHelloWorld() public constant returns (bool) { + return Assert.notEqual(foo.get(), "Hello wordl!", "initial value is not correct"); + } + function valueShouldBeHelloWorld() public constant returns (bool) { return Assert.equal(foo.get(), "Hello wordl!", "initial value is not correct"); } diff --git a/tests/testRunner.js b/tests/testRunner.js index 2eda171678..7875461c06 100644 --- a/tests/testRunner.js +++ b/tests/testRunner.js @@ -114,8 +114,8 @@ describe('testRunner', function () { }) }) - it('should 1 passing tests', function () { - assert.equal(results.passingNum, 1) + it('should 2 passing tests', function () { + assert.equal(results.passingNum, 2) }) it('should 1 failing tests', function () { @@ -126,6 +126,7 @@ describe('testRunner', function () { assert.deepEqual(tests, [ { type: 'contract', value: 'StringTest', filename: 'simple_string_test.sol' }, { type: 'testFailure', value: 'Value should be hello world', time: 1, context: 'StringTest', "errMsg": "function returned false" }, + { type: 'testPass', value: 'Value should not be hello world', time: 1, context: 'StringTest' }, { type: 'testPass', value: 'Initial value should be hello', time: 1, context: 'StringTest' }, ]) })