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

Function TestInDeltaSlice

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

Source from the content-addressed store, hash-verified

1803}
1804
1805func TestInDeltaSlice(t *testing.T) {
1806 mockT := new(testing.T)
1807
1808 True(t, InDeltaSlice(mockT,
1809 []float64{1.001, math.NaN(), 0.999},
1810 []float64{1, math.NaN(), 1},
1811 0.1), "{1.001, NaN, 0.009} is element-wise close to {1, NaN, 1} in delta=0.1")
1812
1813 True(t, InDeltaSlice(mockT,
1814 []float64{1, math.NaN(), 2},
1815 []float64{0, math.NaN(), 3},
1816 1), "{1, NaN, 2} is element-wise close to {0, NaN, 3} in delta=1")
1817
1818 False(t, InDeltaSlice(mockT,
1819 []float64{1, math.NaN(), 2},
1820 []float64{0, math.NaN(), 3},
1821 0.1), "{1, NaN, 2} is not element-wise close to {0, NaN, 3} in delta=0.1")
1822
1823 False(t, InDeltaSlice(mockT, "", nil, 1), "Expected non numeral slices to fail")
1824}
1825
1826func TestInDeltaMapValues(t *testing.T) {
1827 mockT := new(testing.T)

Callers

nothing calls this directly

Calls 3

TrueFunction · 0.70
InDeltaSliceFunction · 0.70
FalseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…