You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

requirements.go 1.1KB

1234567891011121314151617181920212223242526272829
  1. package require
  2. // TestingT is an interface wrapper around *testing.T
  3. type TestingT interface {
  4. Errorf(format string, args ...interface{})
  5. FailNow()
  6. }
  7. type tHelper interface {
  8. Helper()
  9. }
  10. // ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful
  11. // for table driven tests.
  12. type ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{})
  13. // ValueAssertionFunc is a common function prototype when validating a single value. Can be useful
  14. // for table driven tests.
  15. type ValueAssertionFunc func(TestingT, interface{}, ...interface{})
  16. // BoolAssertionFunc is a common function prototype when validating a bool value. Can be useful
  17. // for table driven tests.
  18. type BoolAssertionFunc func(TestingT, bool, ...interface{})
  19. // ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful
  20. // for table driven tests.
  21. type ErrorAssertionFunc func(TestingT, error, ...interface{})
  22. //go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl -include-format-funcs