Documentation
¶
Overview ¶
Package graphtest holds test utilities for packages that depend on the graph package.
Index ¶
- func BuildTestBackend() compute.Backenddeprecated
- func RunTestGraphFn(t *testing.T, testName string, graphFn TestGraphFn, want []any, delta float64)
- func RunTestGraphFnWithBackend(t *testing.T, testName string, backend compute.Backend, graphFn TestGraphFn, ...)
- func TestOfficialBackends(t *testing.T, testFn func(t *testing.T, backend compute.Backend), ...)deprecated
- type TestGraphFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTestBackend
deprecated
func RunTestGraphFn ¶
RunTestGraphFn tests a graph building function graphFn by executing it and comparing its output(s) to the values in want, reporting back any errors in t.
delta is the margin of value on the difference of output and want values that are acceptable. Values of delta <= 0 means only exact equality is accepted.
func RunTestGraphFnWithBackend ¶
func RunTestGraphFnWithBackend(t *testing.T, testName string, backend compute.Backend, graphFn TestGraphFn, want []any, delta float64)
RunTestGraphFnWithBackend tests a graph building function graphFn by executing it and comparing its output(s) to the values in want, reporting back any errors in t.
delta is the margin of value on the difference of output and want values that are acceptable. Values of delta <= 0 means only exact equality is accepted.
func TestOfficialBackends
deprecated
func TestOfficialBackends(t *testing.T, testFn func(t *testing.T, backend compute.Backend), excludeBackends ...string)
TestOfficialBackends iterates over list of backends and calls testFn for each of them. If GOMLX_BACKEND environment variable is set, it will only iterate over the one set. If GOMLX_BACKEND is not set, it will iterate over all official backends, except those in excludecompute. (for tests known not to work on those backends)
Deprecated: use testutil.TestOfficialBackends instead.