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
b7655b65
Commit
b7655b65
authored
Nov 19, 2018
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes tests
parent
949a65f4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
21 deletions
+20
-21
byteStorage.js
remix-debug/test/decoder/contracts/byteStorage.js
+2
-2
intLocal.js
remix-debug/test/decoder/contracts/intLocal.js
+3
-3
mappingStorage.js
remix-debug/test/decoder/contracts/mappingStorage.js
+2
-2
miscLocal.js
remix-debug/test/decoder/contracts/miscLocal.js
+2
-2
structArrayLocal.js
remix-debug/test/decoder/contracts/structArrayLocal.js
+1
-1
structArrayStorage.js
remix-debug/test/decoder/contracts/structArrayStorage.js
+1
-1
decodeInfo.js
remix-debug/test/decoder/decodeInfo.js
+2
-3
mapping.js
remix-debug/test/decoder/stateTests/mapping.js
+1
-1
tests.js
remix-debug/test/tests.js
+6
-6
No files found.
remix-debug/test/decoder/contracts/byteStorage.js
View file @
b7655b65
...
...
@@ -6,10 +6,10 @@ module.exports = {
enum enum1 { e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, e64, e65, e66, e67, e68, e69, e70, e71, e72, e73, e74, e75, e76, e77, e78, e79, e80, e81, e82, e83, e84, e85, e86, e87, e88, e89, e90, e91, e92, e93, e94, e95, e96, e97, e98, e99, e100, e101, e102, e103, e104, e105, e106, e107, e108, e109, e110, e111, e112, e113, e114, e115, e116, e117, e118, e119, e120, e121, e122, e123, e124, e125, e126, e127, e128, e129, e130, e131, e132, e133, e134, e135, e136, e137, e138, e139, e140, e141, e142, e143, e144, e145, e146, e147, e148, e149, e150, e151, e152, e153, e154, e155, e156, e157, e158, e159, e160, e161, e162, e163, e164, e165, e166, e167, e168, e169, e170, e171, e172, e173, e174, e175, e176, e177, e178, e179, e180, e181, e182, e183, e184, e185, e186, e187, e188, e189, e190, e191, e192, e193, e194, e195, e196, e197, e198, e199, e200, e201, e202, e203, e204, e205, e206, e207, e208, e209, e210, e211, e212, e213, e214, e215, e216, e217, e218, e219, e220, e221, e222, e223, e224, e225, e226, e227, e228, e229, e230, e231, e232, e233, e234, e235, e236, e237, e238, e239, e240, e241, e242, e243, e244, e245, e246, e247, e248, e249, e250, e251, e252, e253, e254, e255, e256, e257, e258, e259, e260 }
bool b1 = false;
address a1 = 0xf
e350f199f244ac9a
79038d254400b632a633225;
address a1 = 0xf
E350f199F244ac9A
79038d254400b632a633225;
bool b2 = true;
bytes dynb1 = "dynamicbytes";
byte stab = 0x1;
byte stab = 0x
0
1;
bytes1 stab1 = hex"12";
bytes2 stab2 = hex"1579";
bytes3 stab3 = hex"359356";
...
...
remix-debug/test/decoder/contracts/intLocal.js
View file @
b7655b65
...
...
@@ -9,7 +9,7 @@ contract proxy {
}
}
contract intLocal {
function intLocal ()
{
constructor () public
{
proxy.testStruct memory p;
uint8 ui8 = 130;
uint16 ui16 = 456;
...
...
@@ -31,11 +31,11 @@ contract intLocal {
level11();
}
function level11() {
function level11()
public
{
uint8 ui8 = 123;
level12();
}
function level12() {
function level12()
public
{
uint8 ui81 = 12;
}
}
...
...
remix-debug/test/decoder/contracts/mappingStorage.js
View file @
b7655b65
module
.
exports
=
{
contract
:
`
pragma solidity ^0.
4.19
;
pragma solidity ^0.
5.0
;
contract SimpleMappingState {
uint _num;
mapping(string => uint) _iBreakSolidityState;
mapping(uint => uint) _iBreakSolidityStateInt;
function updateNum(uint num, string str) public {
function updateNum(uint num, string
memory
str) public {
_num = num;
_iBreakSolidityState[str] = num;
_iBreakSolidityStateInt[num] = num;
...
...
remix-debug/test/decoder/contracts/miscLocal.js
View file @
b7655b65
...
...
@@ -9,7 +9,7 @@ contract miscLocal {
three,
four
}
function miscLocal ()
{
constructor () public
{
bool boolFalse = false;
bool boolTrue = true;
enumDef testEnum;
...
...
@@ -31,7 +31,7 @@ contract miscLocal {
}
contract miscLocal2 {
function miscLocal2 ()
{
constructor () public
{
bytes memory dynbytes = "dynamicbytes";
string memory smallstring = "test_test_test";
}
...
...
remix-debug/test/decoder/contracts/structArrayLocal.js
View file @
b7655b65
...
...
@@ -24,7 +24,7 @@ contract structArrayLocal {
enumdef c;
}
function structArrayLocal ()
{
constructor () public
{
bytes memory bytesSimple = "test_super";
teststruct memory e;
e.a = "test";
...
...
remix-debug/test/decoder/contracts/structArrayStorage.js
View file @
b7655b65
...
...
@@ -25,7 +25,7 @@ module.exports = {
string str;
}
simpleStruct[][3] arrayStruct;
function structArrayStorage ()
{
constructor () public
{
intStructDec.i8 = 32;
intStructDec.i16 = -54;
intStructDec.ui32 = 128;
...
...
remix-debug/test/decoder/decodeInfo.js
View file @
b7655b65
...
...
@@ -67,7 +67,6 @@ tape('solidity', function (t) {
output
=
compiler
.
compile
(
compilerInput
(
simplecontracts
))
output
=
JSON
.
parse
(
output
)
state
=
astHelper
.
extractStateDefinitions
(
'test.sol:simpleContract'
,
output
.
sources
)
states
=
astHelper
.
extractStatesDefinitions
(
output
.
sources
)
stateDef
=
state
.
stateDefinitions
...
...
@@ -81,10 +80,10 @@ tape('solidity', function (t) {
state
=
astHelper
.
extractStateDefinitions
(
'test.sol:test2'
,
output
.
sources
)
stateDef
=
state
.
stateDefinitions
parsedType
=
decodeInfo
.
parseType
(
stateDef
[
0
].
attributes
.
type
,
states
,
'test1'
,
util
.
extractLocationFromAstVariable
(
stateDef
[
0
]))
checkDecodeInfo
(
st
,
parsedType
,
0
,
32
,
'struct test1.str'
)
checkDecodeInfo
(
st
,
parsedType
,
1
,
32
,
'struct test1.str'
)
state
=
stateDecoder
.
extractStateVariables
(
'test.sol:test2'
,
output
.
sources
)
checkDecodeInfo
(
st
,
parsedType
,
0
,
32
,
'struct test1.str'
)
checkDecodeInfo
(
st
,
parsedType
,
1
,
32
,
'struct test1.str'
)
st
.
end
()
})
...
...
remix-debug/test/decoder/stateTests/mapping.js
View file @
b7655b65
...
...
@@ -48,7 +48,7 @@ function testMapping (st, vm, privateKey, contractAddress, output, cb) {
var
traceManager
=
new
TraceManager
({
web3
:
vm
.
web3
})
traceManager
.
resolveTrace
(
tx
,
()
=>
{
var
storageViewer
=
new
StorageViewer
({
stepIndex
:
2
13
,
stepIndex
:
2
68
,
tx
:
tx
,
address
:
contractAddress
},
new
StorageResolver
({
web3
:
vm
.
web3
}),
traceManager
)
...
...
remix-debug/test/tests.js
View file @
b7655b65
...
...
@@ -109,8 +109,8 @@ function testDebugging (t, debugManager) {
breakPointManager
.
event
.
register
(
'breakpointHit'
,
function
(
sourceLocation
,
step
)
{
console
.
log
(
'breakpointHit'
)
t
.
equal
(
JSON
.
stringify
(
sourceLocation
),
JSON
.
stringify
({
start
:
5
91
,
length
:
1
,
file
:
0
,
jump
:
'-'
}))
t
.
equal
(
step
,
7
5
)
t
.
equal
(
JSON
.
stringify
(
sourceLocation
),
JSON
.
stringify
({
start
:
5
87
,
length
:
1
,
file
:
0
,
jump
:
'-'
}))
t
.
equal
(
step
,
7
4
)
})
breakPointManager
.
event
.
register
(
'noBreakpointHit'
,
function
()
{
...
...
@@ -120,7 +120,7 @@ function testDebugging (t, debugManager) {
breakPointManager
.
jumpNextBreakpoint
(
0
,
true
)
}
var
ballot
=
`pragma solidity ^0.
4
.0;
var
ballot
=
`pragma solidity ^0.
5
.0;
contract Ballot {
struct Voter {
...
...
@@ -138,13 +138,13 @@ contract Ballot {
Proposal[] proposals;
/// Create a new ballot with $(_numProposals) different proposals.
function Ballot
() public {
constructor
() public {
uint p = 45;
chairperson = msg.sender;
address addressLocal = msg.sender; // copy of state variable
voters[chairperson].weight = 1;
proposals.length = 1;
Proposal[] proposalsLocals = proposals; // copy of state variable
Proposal[]
storage
proposalsLocals = proposals; // copy of state variable
}
/// Give $(toVoter) the right to vote on this ballot.
...
...
@@ -179,7 +179,7 @@ contract Ballot {
proposals[toProposal].voteCount += sender.weight;
}
function winningProposal() public
constant
returns (uint8 _winningProposal) {
function winningProposal() public
view
returns (uint8 _winningProposal) {
uint256 winningVoteCount = 0;
for (uint8 prop = 0; prop < proposals.length; prop++)
if (proposals[prop].voteCount > winningVoteCount) {
...
...
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