官术网_书友最值得收藏!

Running tests in variadic_test.go

Let's run these tests and see the output. We'll use the -v flag while running the tests to see the output of each individual test:

$ go test -v ./{variadic_test.go,variadic.go}                                                                                                              
=== RUN   TestSimpleVariadicToSlice        
--- PASS: TestSimpleVariadicToSlice (0.00s)                                           
        variadic_test.go:10: simpleVariadicToSlice() -> nil                           
        variadic_test.go:26: simpleVariadicToSlice(1, 2, 3) -> []int{1, 2, 3}         
        variadic_test.go:41: simpleVariadicToSlice([]int{1, 2, 3}...) -> []int{1, 2, 3}                                                                                      
=== RUN   TestMixedVariadicToSlice         
--- PASS: TestMixedVariadicToSlice (0.00s) 
        variadic_test.go:49: Received as expected: Bob, <nil slice>                   
PASS                                       
ok      command-line-arguments  0.001s    
主站蜘蛛池模板: 恭城| 孟连| 陕西省| 元朗区| 西林县| 通河县| 木兰县| 广丰县| 邯郸县| 昌图县| 秀山| 铜梁县| 永修县| 曲阳县| 渭源县| 庆阳市| 滁州市| 汾阳市| 利辛县| 通渭县| 郑州市| 哈尔滨市| 乌兰浩特市| 晋中市| 五大连池市| 壤塘县| 淮安市| 萍乡市| 德昌县| 栾城县| 普陀区| 社会| 普兰县| 彭泽县| 太原市| 陇川县| 聂荣县| 龙里县| 常德市| 湖北省| 东港市|