clean up validation config
This commit is contained in:
parent
72132c851b
commit
bd91008462
@ -1,24 +1,31 @@
|
||||
package validation
|
||||
|
||||
//
|
||||
// ValidationConfig
|
||||
// Config
|
||||
//
|
||||
|
||||
type ValidationConfig struct {
|
||||
type Config struct {
|
||||
trackGas bool
|
||||
checkExitCode bool
|
||||
checkReturnValue bool
|
||||
}
|
||||
|
||||
func (v ValidationConfig) ValidateGas() bool {
|
||||
func NewConfig(gas, exit, ret bool) *Config {
|
||||
return &Config{
|
||||
trackGas: gas,
|
||||
checkExitCode: exit,
|
||||
checkReturnValue: ret,
|
||||
}
|
||||
}
|
||||
|
||||
func (v Config) ValidateGas() bool {
|
||||
return v.trackGas
|
||||
}
|
||||
|
||||
func (v ValidationConfig) ValidateExitCode() bool {
|
||||
func (v Config) ValidateExitCode() bool {
|
||||
return v.checkExitCode
|
||||
}
|
||||
|
||||
func (v ValidationConfig) ValidateReturnValue() bool {
|
||||
func (v Config) ValidateReturnValue() bool {
|
||||
return v.checkReturnValue
|
||||
}
|
||||
|
||||
|
@ -39,9 +39,9 @@ func (f *Factories) NewRandomnessSource() vstate.RandomnessSource {
|
||||
}
|
||||
|
||||
func (f *Factories) NewValidationConfig() vstate.ValidationConfig {
|
||||
return &ValidationConfig{
|
||||
trackGas: false,
|
||||
checkExitCode: true,
|
||||
checkReturnValue: false,
|
||||
}
|
||||
trackGas := false
|
||||
checkExit := true
|
||||
checkRet := false
|
||||
// ignore gas and return value assertions
|
||||
return NewConfig(trackGas, checkExit, checkRet)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user