Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
f27feac3
Commit
f27feac3
authored
Aug 23, 2018
by
0mkar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check notEqual(<string>)
parent
cf9c325c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
simple_string_test.sol
tests/examples_3/simple_string_test.sol
+4
-0
testRunner.js
tests/testRunner.js
+3
-2
No files found.
tests/examples_3/simple_string_test.sol
View file @
f27feac3
...
@@ -13,6 +13,10 @@ contract StringTest {
...
@@ -13,6 +13,10 @@ contract StringTest {
return Assert.equal(foo.get(), "Hello world!", "initial value is not correct");
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) {
function valueShouldBeHelloWorld() public constant returns (bool) {
return Assert.equal(foo.get(), "Hello wordl!", "initial value is not correct");
return Assert.equal(foo.get(), "Hello wordl!", "initial value is not correct");
}
}
...
...
tests/testRunner.js
View file @
f27feac3
...
@@ -114,8 +114,8 @@ describe('testRunner', function () {
...
@@ -114,8 +114,8 @@ describe('testRunner', function () {
})
})
})
})
it
(
'should
1
passing tests'
,
function
()
{
it
(
'should
2
passing tests'
,
function
()
{
assert
.
equal
(
results
.
passingNum
,
1
)
assert
.
equal
(
results
.
passingNum
,
2
)
})
})
it
(
'should 1 failing tests'
,
function
()
{
it
(
'should 1 failing tests'
,
function
()
{
...
@@ -126,6 +126,7 @@ describe('testRunner', function () {
...
@@ -126,6 +126,7 @@ describe('testRunner', function () {
assert
.
deepEqual
(
tests
,
[
assert
.
deepEqual
(
tests
,
[
{
type
:
'contract'
,
value
:
'StringTest'
,
filename
:
'simple_string_test.sol'
},
{
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
:
'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'
},
{
type
:
'testPass'
,
value
:
'Initial value should be hello'
,
time
:
1
,
context
:
'StringTest'
},
])
])
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment