Commit f27feac3 authored by 0mkar's avatar 0mkar

check notEqual(<string>)

parent cf9c325c
......@@ -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");
}
......
......@@ -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' },
])
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment