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
0297f165
Unverified
Commit
0297f165
authored
Oct 16, 2019
by
Aniket
Committed by
GitHub
Oct 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1317 from ethereum/tests_for_1314
tests for #1314
parents
0c428d81
2a90acd7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
staticAnalysisIntegration-test-0.4.24.js
...er/test/analysis/staticAnalysisIntegration-test-0.4.24.js
+2
-2
staticAnalysisIntegration-test-0.5.0.js
...zer/test/analysis/staticAnalysisIntegration-test-0.5.0.js
+2
-2
forLoopIteratesOverDynamicArray.sol
...acts/solidity-v0.4.24/forLoopIteratesOverDynamicArray.sol
+7
-1
forLoopIteratesOverDynamicArray.sol
...ntracts/solidity-v0.5/forLoopIteratesOverDynamicArray.sol
+7
-1
No files found.
remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.4.24.js
View file @
0297f165
...
@@ -274,7 +274,7 @@ test('Integration test gasCosts.js', function (t) {
...
@@ -274,7 +274,7 @@ test('Integration test gasCosts.js', function (t) {
'ERC20.sol'
:
2
,
'ERC20.sol'
:
2
,
'stringBytesLength.sol'
:
1
,
'stringBytesLength.sol'
:
1
,
'etherTransferInLoop.sol'
:
3
,
'etherTransferInLoop.sol'
:
3
,
'forLoopIteratesOverDynamicArray.sol'
:
1
'forLoopIteratesOverDynamicArray.sol'
:
2
}
}
runModuleOnFiles
(
module
,
t
,
(
file
,
report
)
=>
{
runModuleOnFiles
(
module
,
t
,
(
file
,
report
)
=>
{
...
@@ -898,7 +898,7 @@ test('Integration test forLoopIteratesOverDynamicArray.js', function (t) {
...
@@ -898,7 +898,7 @@ test('Integration test forLoopIteratesOverDynamicArray.js', function (t) {
'ERC20.sol'
:
0
,
'ERC20.sol'
:
0
,
'stringBytesLength.sol'
:
0
,
'stringBytesLength.sol'
:
0
,
'etherTransferInLoop.sol'
:
0
,
'etherTransferInLoop.sol'
:
0
,
'forLoopIteratesOverDynamicArray.sol'
:
1
'forLoopIteratesOverDynamicArray.sol'
:
2
}
}
runModuleOnFiles
(
module
,
t
,
(
file
,
report
)
=>
{
runModuleOnFiles
(
module
,
t
,
(
file
,
report
)
=>
{
...
...
remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.5.0.js
View file @
0297f165
...
@@ -274,7 +274,7 @@ test('Integration test gasCosts.js', function (t) {
...
@@ -274,7 +274,7 @@ test('Integration test gasCosts.js', function (t) {
'ERC20.sol'
:
2
,
'ERC20.sol'
:
2
,
'stringBytesLength.sol'
:
1
,
'stringBytesLength.sol'
:
1
,
'etherTransferInLoop.sol'
:
3
,
'etherTransferInLoop.sol'
:
3
,
'forLoopIteratesOverDynamicArray.sol'
:
1
'forLoopIteratesOverDynamicArray.sol'
:
2
}
}
runModuleOnFiles
(
module
,
t
,
(
file
,
report
)
=>
{
runModuleOnFiles
(
module
,
t
,
(
file
,
report
)
=>
{
...
@@ -902,7 +902,7 @@ test('Integration test forLoopIteratesOverDynamicArray.js', function (t) {
...
@@ -902,7 +902,7 @@ test('Integration test forLoopIteratesOverDynamicArray.js', function (t) {
'ERC20.sol'
:
0
,
'ERC20.sol'
:
0
,
'stringBytesLength.sol'
:
0
,
'stringBytesLength.sol'
:
0
,
'etherTransferInLoop.sol'
:
0
,
'etherTransferInLoop.sol'
:
0
,
'forLoopIteratesOverDynamicArray.sol'
:
1
'forLoopIteratesOverDynamicArray.sol'
:
2
}
}
runModuleOnFiles
(
module
,
t
,
(
file
,
report
)
=>
{
runModuleOnFiles
(
module
,
t
,
(
file
,
report
)
=>
{
...
...
remix-analyzer/test/analysis/test-contracts/solidity-v0.4.24/forLoopIteratesOverDynamicArray.sol
View file @
0297f165
...
@@ -6,10 +6,16 @@ contract forLoopArr {
...
@@ -6,10 +6,16 @@ contract forLoopArr {
}
}
function shiftArrItem(uint index) returns(uint[]) {
function shiftArrItem(uint index) returns(uint[]) {
// TODO: for (uint i = index; i < array.length-1; i++) should also generate warning
for (uint i = index; i < array.length; i++) {
for (uint i = index; i < array.length; i++) {
array[i] = array[i+1];
array[i] = array[i+1];
}
}
return array;
return array;
}
}
function shiftArrItem2(uint index) returns(uint[]) {
for (uint i = index; i < array.length - 1; i++) {
array[i] = array[i+1];
}
return array;
}
}
}
remix-analyzer/test/analysis/test-contracts/solidity-v0.5/forLoopIteratesOverDynamicArray.sol
View file @
0297f165
...
@@ -6,10 +6,16 @@ contract forLoopArr {
...
@@ -6,10 +6,16 @@ contract forLoopArr {
}
}
function shiftArrItem(uint index) public returns(uint[] memory) {
function shiftArrItem(uint index) public returns(uint[] memory) {
// TODO: for (uint i = index; i < array.length-1; i++) should also generate warning
for (uint i = index; i < array.length; i++) {
for (uint i = index; i < array.length; i++) {
array[i] = array[i+1];
array[i] = array[i+1];
}
}
return array;
return array;
}
}
function shiftArrItem2(uint index) public returns(uint[] memory) {
for (uint i = index; i < array.length - 1; i++) {
array[i] = array[i+1];
}
return array;
}
}
}
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