blob: 91772dfeb919224e3f35b7e9f13d4b866a8339f7 [file] [log] [blame]
amit.ghosh6ab2a982022-09-15 21:04:53 +02001package require
2
3// TestingT is an interface wrapper around *testing.T
4type TestingT interface {
5 Errorf(format string, args ...interface{})
6 FailNow()
7}
8
9type tHelper interface {
10 Helper()
11}
12
13// ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful
14// for table driven tests.
15type ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{})
16
17// ValueAssertionFunc is a common function prototype when validating a single value. Can be useful
18// for table driven tests.
19type ValueAssertionFunc func(TestingT, interface{}, ...interface{})
20
21// BoolAssertionFunc is a common function prototype when validating a bool value. Can be useful
22// for table driven tests.
23type BoolAssertionFunc func(TestingT, bool, ...interface{})
24
25// ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful
26// for table driven tests.
27type ErrorAssertionFunc func(TestingT, error, ...interface{})
28
29//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=require -template=require.go.tmpl -include-format-funcs"