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
45916fe9
Commit
45916fe9
authored
May 30, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support remix_tests.sol reference
parent
aa3bc256
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
compiler.js
src/compiler.js
+6
-1
No files found.
src/compiler.js
View file @
45916fe9
...
@@ -10,7 +10,8 @@ function compileFileOrFiles (filename, isDirectory, cb) {
...
@@ -10,7 +10,8 @@ function compileFileOrFiles (filename, isDirectory, cb) {
let
compiler
,
filepath
let
compiler
,
filepath
const
sources
=
{
const
sources
=
{
'tests.sol'
:
{
content
:
fs
.
readFileSync
(
'sol/tests.sol'
).
toString
()}
'tests.sol'
:
{
content
:
require
(
'../sol/tests.sol.js'
)
},
'remix_tests.sol'
:
{
content
:
require
(
'../sol/tests.sol.js'
)
}
}
}
// TODO: for now assumes filepath dir contains all tests, later all this
// TODO: for now assumes filepath dir contains all tests, later all this
...
@@ -48,6 +49,10 @@ function compileFileOrFiles (filename, isDirectory, cb) {
...
@@ -48,6 +49,10 @@ function compileFileOrFiles (filename, isDirectory, cb) {
function
compileContractSources
(
sources
,
cb
)
{
function
compileContractSources
(
sources
,
cb
)
{
let
compiler
,
filepath
let
compiler
,
filepath
if
(
!
sources
[
'remix_tests.sol'
])
{
sources
[
'remix_tests.sol'
]
=
{
content
:
require
(
'../sol/tests.sol.js'
)}
}
async
.
waterfall
([
async
.
waterfall
([
function
loadCompiler
(
next
)
{
function
loadCompiler
(
next
)
{
compiler
=
new
RemixCompiler
()
compiler
=
new
RemixCompiler
()
...
...
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