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
02c51234
Commit
02c51234
authored
May 25, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update example tests
parent
ca847b53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
simple_storage2_test.sol
examples/simple_storage2_test.sol
+0
-5
simple_storage_test.sol
examples/simple_storage_test.sol
+8
-0
No files found.
examples/simple_storage2_test.sol
View file @
02c51234
...
...
@@ -25,10 +25,5 @@ contract MyTest2 {
return Assert.equal(foo.get(), 200, "initial value is not correct");
}
// TODO: the tests don't necessarily run in order
//function initialValueShouldBe400() public constant returns (bool) {
// return Assert.equal(foo.get(), 400, "initial value is not correct");
//}
}
examples/simple_storage_test.sol
View file @
02c51234
...
...
@@ -4,11 +4,19 @@ import "./simple_storage.sol";
contract MyTest {
SimpleStorage foo;
uint i = 0;
function beforeAll() {
foo = new SimpleStorage();
}
function beforeEach() {
if (i == 1) {
foo.set(200);
}
i += 1;
}
function initialValueShouldBe100() public {
Assert.equal(foo.get(), 100, "initial value is not correct");
}
...
...
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