MCPcopy Index your code
hub / github.com/expr-lang/expr / TestInEpsilonSlice

Function TestInEpsilonSlice

internal/testify/assert/assertions_test.go:1951–1965  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1949}
1950
1951func TestInEpsilonSlice(t *testing.T) {
1952 mockT := new(testing.T)
1953
1954 True(t, InEpsilonSlice(mockT,
1955 []float64{2.2, math.NaN(), 2.0},
1956 []float64{2.1, math.NaN(), 2.1},
1957 0.06), "{2.2, NaN, 2.0} is element-wise close to {2.1, NaN, 2.1} in epsilon=0.06")
1958
1959 False(t, InEpsilonSlice(mockT,
1960 []float64{2.2, 2.0},
1961 []float64{2.1, 2.1},
1962 0.04), "{2.2, 2.0} is not element-wise close to {2.1, 2.1} in epsilon=0.04")
1963
1964 False(t, InEpsilonSlice(mockT, "", nil, 1), "Expected non numeral slices to fail")
1965}
1966
1967func TestRegexp(t *testing.T) {
1968 mockT := new(testing.T)

Callers

nothing calls this directly

Calls 3

TrueFunction · 0.70
InEpsilonSliceFunction · 0.70
FalseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…