// +build !generate_numeric package hit import minitest "github.com/Eun/go-hit/internal/minitest" // ⚠️⚠️⚠️ This file was autogenerated by generators/expect/numeric ⚠️⚠️⚠️ // // IExpectInt32 provides assertions for the int32 type. type IExpectInt32 interface { // Equal expects the int32 to be equal to the specified value. Equal(value int32) IStep // NotEqual expects the int32 to be not equal to the specified value. NotEqual(value ...int32) IStep // OneOf expects the int32 to be equal to one of the specified values. OneOf(values ...int32) IStep // NotOneOf expects the int32 to be not equal to one of the specified values. NotOneOf(values ...int32) IStep // GreaterThan expects the int32 to be not greater than the specified value. GreaterThan(value int32) IStep // LessThan expects the int32 to be less than the specified value. LessThan(value int32) IStep // GreaterOrEqualThan expects the int32 to be greater or equal than the specified value. GreaterOrEqualThan(value int32) IStep // LessOrEqualThan expects the int32 to be less or equal than the specified value. LessOrEqualThan(value int32) IStep // Between expects the int32 to be between the specified min and max value (inclusive, min >= int32 >= max). Between(min, max int32) IStep // NotBetween expects the int32 to be not between the specified min and max value (inclusive, min >= int32 >= max). NotBetween(min, max int32) IStep } type expectInt32ValueCallback func(hit Hit) int32 type expectInt32 struct { cp callPath valueCallback expectInt32ValueCallback } func newExpectInt32(cp callPath, valueCallback expectInt32ValueCallback) IExpectInt32 { return &expectInt32{cp: cp, valueCallback: valueCallback} } func (v *expectInt32) Equal(value int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("Equal", []interface{}{value}), Exec: func(hit *hitImpl) error { return minitest.Equal(v.valueCallback(hit), value) }} } func (v *expectInt32) NotEqual(values ...int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("NotEqual", int32SliceToInterfaceSlice(values)), Exec: func(hit *hitImpl) error { return minitest.NotEqual(v.valueCallback(hit), int32SliceToInterfaceSlice(values)...) }} } func (v *expectInt32) OneOf(values ...int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("OneOf", int32SliceToInterfaceSlice(values)), Exec: func(hit *hitImpl) error { return minitest.OneOf(v.valueCallback(hit), int32SliceToInterfaceSlice(values)...) }} } func (v *expectInt32) NotOneOf(values ...int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("NotOneOf", int32SliceToInterfaceSlice(values)), Exec: func(hit *hitImpl) error { return minitest.NotOneOf(v.valueCallback(hit), int32SliceToInterfaceSlice(values)...) }} } func (v *expectInt32) GreaterThan(value int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("GreaterThan", []interface{}{value}), Exec: func(hit *hitImpl) error { l := v.valueCallback(hit) if l <= value { return minitest.Errorf("expected %d to be greater than %d", l, value) } return nil }} } func (v *expectInt32) LessThan(value int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("LessThan", []interface{}{value}), Exec: func(hit *hitImpl) error { l := v.valueCallback(hit) if l >= value { return minitest.Errorf("expected %d to be less than %d", l, value) } return nil }} } func (v *expectInt32) GreaterOrEqualThan(value int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("GreaterOrEqualThan", []interface{}{value}), Exec: func(hit *hitImpl) error { l := v.valueCallback(hit) if l < value { return minitest.Errorf("expected %d to be greater or equal than %d", l, value) } return nil }} } func (v *expectInt32) LessOrEqualThan(value int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("LessOrEqualThan", []interface{}{value}), Exec: func(hit *hitImpl) error { l := v.valueCallback(hit) if l > value { return minitest.Errorf("expected %d to be less or equal than %d", l, value) } return nil }} } func (v *expectInt32) Between(min, max int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("Between", []interface{}{min, max}), Exec: func(hit *hitImpl) error { l := v.valueCallback(hit) if l < min || l > max { return minitest.Errorf("expected %d to be between %d and %d", l, min, max) } return nil }} } func (v *expectInt32) NotBetween(min, max int32) IStep { return &hitStep{Trace: ett.Prepare(), When: ExpectStep, CallPath: v.cp.Push("NotBetween", []interface{}{min, max}), Exec: func(hit *hitImpl) error { l := v.valueCallback(hit) if l >= min && l <= max { return minitest.Errorf("expected %d not to be between %d and %d", l, min, max) } return nil }} }