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
cf0e2201
Commit
cf0e2201
authored
Jan 19, 2021
by
aniket-engg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests for custom EVM
parent
e986507c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
compiler.ts
libs/remix-solidity/src/compiler/compiler.ts
+1
-1
testRunner.cli.spec.ts
libs/remix-tests/tests/testRunner.cli.spec.ts
+15
-1
testRunner.spec.ts
libs/remix-tests/tests/testRunner.spec.ts
+0
-0
No files found.
libs/remix-solidity/src/compiler/compiler.ts
View file @
cf0e2201
...
@@ -169,7 +169,7 @@ export class Compiler {
...
@@ -169,7 +169,7 @@ export class Compiler {
*/
*/
loadRemoteVersion
(
version
:
string
):
void
{
loadRemoteVersion
(
version
:
string
):
void
{
console
.
log
(
'Loading remote solc version '
+
version
)
console
.
log
(
`Loading remote solc version
${
version
}
...`
)
const
compiler
:
any
=
require
(
'solc'
)
const
compiler
:
any
=
require
(
'solc'
)
compiler
.
loadRemoteVersion
(
version
,
(
err
,
remoteCompiler
)
=>
{
compiler
.
loadRemoteVersion
(
version
,
(
err
,
remoteCompiler
)
=>
{
if
(
err
)
{
if
(
err
)
{
...
...
libs/remix-tests/tests/testRunner.cli.spec.ts
View file @
cf0e2201
...
@@ -54,7 +54,21 @@ Commands:
...
@@ -54,7 +54,21 @@ Commands:
test
(
'remix-tests running a test file with custom compiler version'
,
()
=>
{
test
(
'remix-tests running a test file with custom compiler version'
,
()
=>
{
const
res
=
spawnSync
(
executablePath
,
[
'--compiler'
,
'0.7.4'
,
resolve
(
__dirname
+
'/examples_0/assert_ok_test.sol'
)])
const
res
=
spawnSync
(
executablePath
,
[
'--compiler'
,
'0.7.4'
,
resolve
(
__dirname
+
'/examples_0/assert_ok_test.sol'
)])
// match initial lines
// match initial lines
expect
(
res
.
stdout
.
toString
().
trim
().
includes
(
'Loading remote solc version v0.7.4+commit.3f05b770'
)).
toBeTruthy
()
expect
(
res
.
stdout
.
toString
().
trim
().
includes
(
'Compiler version set to 0.7.4. Latest version is'
)).
toBeTruthy
()
expect
(
res
.
stdout
.
toString
().
trim
().
includes
(
'Loading remote solc version v0.7.4+commit.3f05b770 ...'
)).
toBeTruthy
()
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/:: Running remix-tests - Unit testing for solidity ::/
)
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/creation of library remix_tests.sol:Assert pending.../
)
// match test result
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/Ok pass test/
)
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/Ok fail test/
)
// macth fail test details
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/error: okFailTest fails/
)
})
test
(
'remix-tests running a test file with custom EVM'
,
()
=>
{
const
res
=
spawnSync
(
executablePath
,
[
'--evm'
,
'petersburg'
,
resolve
(
__dirname
+
'/examples_0/assert_ok_test.sol'
)])
// match initial lines
expect
(
res
.
stdout
.
toString
().
trim
().
includes
(
'EVM set to petersburg'
)).
toBeTruthy
()
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/:: Running remix-tests - Unit testing for solidity ::/
)
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/:: Running remix-tests - Unit testing for solidity ::/
)
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/creation of library remix_tests.sol:Assert pending.../
)
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/creation of library remix_tests.sol:Assert pending.../
)
// match test result
// match test result
...
...
libs/remix-tests/tests/testRunner.spec.ts
View file @
cf0e2201
This diff is collapsed.
Click to expand it.
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