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
f48bb9f6
Commit
f48bb9f6
authored
Dec 19, 2019
by
aniket-engg
Committed by
Aniket
Dec 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed analyzer tests
parent
381b0e3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
staticAnalysisCommon-test.js
remix-analyzer/test/analysis/staticAnalysisCommon-test.js
+4
-4
No files found.
remix-analyzer/test/analysis/staticAnalysisCommon-test.js
View file @
f48bb9f6
...
@@ -459,9 +459,9 @@ test('staticAnalysisCommon.isStateVariable', function (t) {
...
@@ -459,9 +459,9 @@ test('staticAnalysisCommon.isStateVariable', function (t) {
test
(
'staticAnalysisCommon.isConstantFunction'
,
function
(
t
)
{
test
(
'staticAnalysisCommon.isConstantFunction'
,
function
(
t
)
{
t
.
plan
(
3
)
t
.
plan
(
3
)
var
node1
=
{
name
:
'FunctionDefinition'
,
attributes
:
{
constant
:
true
}
}
var
node1
=
{
name
:
'FunctionDefinition'
,
attributes
:
{
constant
:
true
,
stateMutability
:
'view'
}
}
var
node2
=
{
name
:
'FunctionDefinition'
,
attributes
:
{
constant
:
false
}
}
var
node2
=
{
name
:
'FunctionDefinition'
,
attributes
:
{
constant
:
false
,
stateMutability
:
'nonpayable'
}
}
var
node3
=
{
name
:
'MemberAccess'
,
attributes
:
{
constant
:
true
}
}
var
node3
=
{
name
:
'MemberAccess'
,
attributes
:
{
constant
:
true
,
stateMutability
:
'view'
}
}
t
.
ok
(
common
.
isConstantFunction
(
node1
),
'should be const func definition'
)
t
.
ok
(
common
.
isConstantFunction
(
node1
),
'should be const func definition'
)
t
.
notOk
(
common
.
isConstantFunction
(
node2
),
'should not be const func definition'
)
t
.
notOk
(
common
.
isConstantFunction
(
node2
),
'should not be const func definition'
)
...
@@ -504,7 +504,7 @@ test('staticAnalysisCommon.isFullyImplementedContract', function (t) {
...
@@ -504,7 +504,7 @@ test('staticAnalysisCommon.isFullyImplementedContract', function (t) {
test
(
'staticAnalysisCommon.isCallToNonConstLocalFunction'
,
function
(
t
)
{
test
(
'staticAnalysisCommon.isCallToNonConstLocalFunction'
,
function
(
t
)
{
t
.
plan
(
2
)
t
.
plan
(
2
)
t
.
ok
(
common
.
isCallToNonConstLocalFunction
(
localCall
),
'should be call to non const Local func'
)
t
.
ok
(
common
.
isCallToNonConstLocalFunction
(
localCall
),
'should be call to non const Local func'
)
localCall
.
children
[
0
].
attributes
.
type
=
'function (struct Ballot.Voter storage pointer)
constant
payable (uint256)'
localCall
.
children
[
0
].
attributes
.
type
=
'function (struct Ballot.Voter storage pointer)
view
payable (uint256)'
t
.
notok
(
common
.
isCallToNonConstLocalFunction
(
localCall
),
'should no longer be call to non const Local func'
)
t
.
notok
(
common
.
isCallToNonConstLocalFunction
(
localCall
),
'should no longer be call to non const Local func'
)
})
})
...
...
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