Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
60838896
Commit
60838896
authored
Dec 15, 2021
by
coolhill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add LIB_RLPReader tests
parent
eff3b5b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
Lib_RLPReader.test.json
...acts/test/data/json/libraries/rlp/Lib_RLPReader.test.json
+52
-0
No files found.
packages/contracts/test/data/json/libraries/rlp/Lib_RLPReader.test.json
View file @
60838896
...
@@ -22,6 +22,12 @@
...
@@ -22,6 +22,12 @@
"0x02"
"0x02"
],
],
"revert"
:
true
"revert"
:
true
},
"input value > 1 length (should revert)"
:
{
"in"
:
[
"0x0101"
],
"revert"
:
"Invalid RLP boolean value."
}
}
},
},
"readAddress"
:
{
"readAddress"
:
{
...
@@ -32,6 +38,26 @@
...
@@ -32,6 +38,26 @@
"out"
:
[
"out"
:
[
"0x1212121212121212121212121212121212121212"
"0x1212121212121212121212121212121212121212"
]
]
},
"address length = 1"
:
{
"in"
:
[
"0x12"
],
"out"
:
[
"0x0000000000000000000000000000000000000000"
]
},
"invalid address length > 21 (should revert)"
:
{
"in"
:
[
"0x94121212121212121212121212121212121212121212121212"
],
"revert"
:
"Invalid RLP address length."
},
"invalid address length < 21 (should revert)"
:
{
"in"
:
[
"0x94121212121212121212121212"
],
"revert"
:
"Invalid RLP address length."
}
}
},
},
"readBytes"
:
{
"readBytes"
:
{
...
@@ -58,6 +84,26 @@
...
@@ -58,6 +84,26 @@
"out"
:
[
"out"
:
[
"0x7f"
"0x7f"
]
]
},
"invalid bytes value, 0xb7 < prefix < 0xbf (should revert)"
:
{
"in"
:
[
"0xb9"
],
"revert"
:
"Invalid RLP long string length."
},
"invalid bytes value, prefix > 0xf7 (should revert)"
:
{
"in"
:
[
"0xff"
],
"revert"
:
"Invalid RLP long list length."
}
},
"readBytes32"
:
{
"invalid length > 33 (should revert)"
:
{
"in"
:
[
"0x11110000000000000000000000000000000000000000000000000000000000000000"
],
"revert"
:
"Invalid RLP bytes32 length."
}
}
},
},
"readString"
:
{
"readString"
:
{
...
@@ -354,6 +400,12 @@
...
@@ -354,6 +400,12 @@
"nonOptimalLongLengthArray2"
:
{
"nonOptimalLongLengthArray2"
:
{
"in"
:
[
"0xb801ff"
],
"in"
:
[
"0xb801ff"
],
"revert"
:
"Invalid RLP list value."
"revert"
:
"Invalid RLP list value."
},
"invalid list value, 0x7f < prefix < 0xb7 (should revert)"
:
{
"in"
:
[
"0x91"
],
"revert"
:
"Invalid RLP short string."
}
}
}
}
}
}
...
...
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