You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
493 B

package observer
import (
"reflect"
"testing"
)
func TestFib(t *testing.T) {
type args struct {
n int
}
tests := []struct {
name string
args args
want chan int
}{
{
name: "测试管道函数-斐波那契数列",
args: args{
n: 50,
},
want: make(chan int),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := Fib(tt.args.n); !reflect.DeepEqual(got, tt.want) {
t.Errorf("Fib() = %v, want %v", got, tt.want)
}
})
}
}