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
6b2270d5
Commit
6b2270d5
authored
Apr 16, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle error from receipt; add todo regarding orgder of tests; fix ws provider
parent
06292d53
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
simple_storage2_test.sol
examples/simple_storage2_test.sol
+9
-2
run.js
run.js
+1
-1
compiler.js
src/compiler.js
+0
-2
testRunner.js
src/testRunner.js
+4
-0
No files found.
examples/simple_storage2_test.sol
View file @
6b2270d5
...
...
@@ -6,8 +6,11 @@ contract MyTest2 {
SimpleStorage foo;
uint i = 0;
function before
Each
() {
function before
All
() {
foo = new SimpleStorage();
}
function beforeEach() {
if (i == 1) {
foo.set(200);
}
...
...
@@ -22,6 +25,10 @@ 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");
//}
}
run.js
View file @
6b2270d5
...
...
@@ -9,7 +9,7 @@ commander.action(function (filename) {
let
web3
=
new
Web3
()
//web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'))
web3
.
setProvider
(
new
Provider
())
//
web3.setProvider(new web3.providers.WebsocketProvider('http
://localhost:8546'))
//
web3.setProvider(new web3.providers.WebsocketProvider('ws
://localhost:8546'))
let
isDirectory
=
fs
.
lstatSync
(
filename
).
isDirectory
()
RemixTests
.
runTestFiles
(
filename
,
isDirectory
,
web3
)
...
...
src/compiler.js
View file @
6b2270d5
...
...
@@ -17,8 +17,6 @@ function compileFileOrFiles (filename, isDirectory, cb) {
// should be replaced with remix's & browser solidity compiler code
filepath
=
(
isDirectory
?
filename
:
path
.
dirname
(
filename
))
//sources[filename] = {content: fs.readFileSync(path.join(filepath, filename)).toString()}
//console.dir(sources);
fs
.
readdirSync
(
filepath
).
forEach
(
file
=>
{
sources
[
file
]
=
{
content
:
fs
.
readFileSync
(
path
.
join
(
filepath
,
file
)).
toString
()}
})
...
...
src/testRunner.js
View file @
6b2270d5
...
...
@@ -83,6 +83,10 @@ function runTest (testName, testObject, testCallback, resultsCallback) {
}
}
next
()
}).
on
(
'error'
,
function
(
err
)
{
console
.
dir
(
"======== error ========"
);
console
.
dir
(
err
);
next
(
err
);
})
}
},
function
()
{
...
...
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