diff --git a/specs/test_formats/ssz/uint.md b/specs/test_formats/ssz/uint.md new file mode 100644 index 000000000..c05a343af --- /dev/null +++ b/specs/test_formats/ssz/uint.md @@ -0,0 +1,26 @@ +# Test format: SSZ uints + +SSZ supports encoding of uints up to 32 bytes. These are considered to be basic types. + +## Test case format + +```yaml +TODO: old format +# type: "uintN" -- string, where N is one of [8, 16, 32, 64, 128, 256] +# valid: bool -- expected validity of the input data +# ssz: bytes -- string, input data, hex encoded, with prefix 0x +# tags: List[string] -- description of test case, in the form of a list of labels +``` + +## Condition + +- Encoding: After encoding the given input number, the +- Decoding: After decoding the given `output` bytes, it should match the `input` number + +## Forks + +Forks-interpretation: `collective` + +``` + +``` \ No newline at end of file diff --git a/test_generators/ssz/main.py b/test_generators/ssz/main.py index f6454c3c0..e53204df0 100644 --- a/test_generators/ssz/main.py +++ b/test_generators/ssz/main.py @@ -8,7 +8,7 @@ from uint_test_cases import ( from gen_base import gen_runner, gen_suite, gen_typing def ssz_random_uint_suite(configs_path: str) -> gen_typing.TestSuiteOutput: - return ("uint_random", "core", gen_suite.render_suite( + return ("uint_random", "uint", gen_suite.render_suite( title="UInt Random", summary="Random integers chosen uniformly over the allowed value range", forks_timeline= "mainnet", @@ -18,7 +18,7 @@ def ssz_random_uint_suite(configs_path: str) -> gen_typing.TestSuiteOutput: test_cases=generate_random_uint_test_cases())) def ssz_wrong_uint_suite(configs_path: str) -> gen_typing.TestSuiteOutput: - return ("uint_wrong_length", "core", gen_suite.render_suite( + return ("uint_wrong_length", "uint", gen_suite.render_suite( title="UInt Wrong Length", summary="Serialized integers that are too short or too long", forks_timeline= "mainnet", @@ -28,7 +28,7 @@ def ssz_wrong_uint_suite(configs_path: str) -> gen_typing.TestSuiteOutput: test_cases=generate_uint_wrong_length_test_cases())) def ssz_uint_bounds_suite(configs_path: str) -> gen_typing.TestSuiteOutput: - return ("uint_bounds", "core", gen_suite.render_suite( + return ("uint_bounds", "uint", gen_suite.render_suite( title="UInt Bounds", summary="Integers right at or beyond the bounds of the allowed value range", forks_timeline= "mainnet",