Documentation
¶
Index ¶
- type FuzzTestParams
- type TestParams
- type TestSuite
- func (s *TestSuite) SetupTest()
- func (s *TestSuite) TestEIP712()
- func (s *TestSuite) TestFlattenPayloadErrorHandling()
- func (s *TestSuite) TestRandomPayloadFlattening()
- func (s *TestSuite) TestTypedDataEdgeCases()
- func (s *TestSuite) TestTypedDataErrorHandling()
- func (s *TestSuite) TestTypedDataGeneration()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FuzzTestParams ¶
type FuzzTestParams struct {
// contains filtered or unexported fields
}
type TestParams ¶
type TestParams struct {
// contains filtered or unexported fields
}
type TestSuite ¶
func NewTestSuite ¶
func NewTestSuite(create network.CreateEvmApp, useLegacyEIP712TypedData bool, options ...network.ConfigOption) *TestSuite
func (*TestSuite) TestEIP712 ¶
func (s *TestSuite) TestEIP712()
func (*TestSuite) TestFlattenPayloadErrorHandling ¶
func (s *TestSuite) TestFlattenPayloadErrorHandling()
TestFlattenPayloadErrorHandling tests error handling in TypedData generation, specifically regarding the payload.
func (*TestSuite) TestRandomPayloadFlattening ¶
func (s *TestSuite) TestRandomPayloadFlattening()
TestRandomPayloadFlattening generates many random payloads with different JSON values to ensure that Flattening works across all inputs. Note that this is a fuzz test, although it doesn't use Go's Fuzz testing suite, since there are variable input sizes, types, and fields. While it may be possible to translate a single input into a JSON object, it would require difficult parsing, and ultimately approximates our randomized unit tests as they are.
func (*TestSuite) TestTypedDataEdgeCases ¶
func (s *TestSuite) TestTypedDataEdgeCases()
TestTypedDataEdgeCases tests certain interesting edge cases to ensure that they work (or don't work) as expected.
func (*TestSuite) TestTypedDataErrorHandling ¶
func (s *TestSuite) TestTypedDataErrorHandling()
TestTypedDataErrorHandling tests error handling for TypedData generation in the main algorithm.
func (*TestSuite) TestTypedDataGeneration ¶
func (s *TestSuite) TestTypedDataGeneration()
TestTypedDataGeneration tests certain qualities about the output Types representation.