MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / TestZeroValue

Function TestZeroValue

common/chan_utils_test.go:88–103  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86}
87
88func TestZeroValue(t *testing.T) {
89
90 testZeroValue := func(name string, got, want interface{}) {
91 t.Run(name, func(t *testing.T) {
92 if !reflect.DeepEqual(got, want) {
93 t.Errorf("zeroValue() = %v, want %v", got, want)
94 }
95 })
96 }
97
98 testZeroValue("int", zeroValue[int](), 0)
99 testZeroValue("float64", zeroValue[float64](), float64(0))
100 testZeroValue("string", zeroValue[string](), "")
101 testZeroValue("bool", zeroValue[bool](), false)
102
103}
104
105func TestReceiveFromChannel(t *testing.T) {
106 // Since SendToChannel has already been tested, only buffered chan will be considered here

Callers

nothing calls this directly

Calls 1

RunMethod · 0.65

Tested by

no test coverage detected