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

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    
主站蜘蛛池模板: 泗洪县| 安龙县| 朝阳市| 崇州市| 安泽县| 会同县| 若羌县| 瓮安县| 阿尔山市| 南城县| 沙河市| 临城县| 大冶市| 永年县| 乡宁县| 南皮县| 长兴县| 高台县| 当雄县| 林西县| 丰都县| 怀柔区| 乌恰县| 合水县| 威远县| 铁力市| 晋城| 格尔木市| 沁阳市| 当涂县| 邓州市| 灵寿县| 新邵县| 临西县| 昌邑市| 灵石县| 炉霍县| 新巴尔虎左旗| 黑龙江省| 岑溪市| 临安市|