openethereum/json-tests/json/rlp
2015-12-03 06:13:27 +01:00
..
catdog.json empty lists tests 2015-12-03 06:06:42 +01:00
empty_lists.json empty lists tests 2015-12-03 06:06:42 +01:00
empty.json additional simple json tests 2015-12-03 06:13:27 +01:00
integer.json additional simple json tests 2015-12-03 06:13:27 +01:00
README.md fixed example .json files 2015-12-03 05:47:07 +01:00

Rlp tests guideline

Rlp can be tested in various ways. It can encode/decode a value or an array of values. Let's start with encoding.

Each operation must have field:

  • operation - append, append_list, append_empty or append_raw

Additionally append and append_raw must additionally define a value field:

  • value - data

Also append_raw and append_list requires len field

  • len - integer

Encoding Test Example

{
	"input":
	[
		{
			"operation": "append_list",
			"len": 2
		},
		{
			"operation": "append",
			"value": "cat"
		},
		{
			"operation": "append",
			"value": "dog"
		}
	],
	"output": "0xc88363617183646f67"
}