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

Running tests in nil_test.go

We run three tests, where two test cases will pass and one will fail. This way we can see the tick mark and cross mark in action:

$ go test -v ./nil_test.go                                          
=== RUN   TestServer                       
=== RUN   TestServer/Request_correct_URL   
=== RUN   TestServer/Request_incorrect_URL 
=== RUN   TestServer/Fail_for_no_reason    
--- FAIL: TestServer (0.00s)               
  --- PASS: TestServer/Request_correct_URL (0.00s)                                  
        nil_test.go:55: Got 1. == Got 1.  
  --- PASS: TestServer/Request_incorrect_URL (0.00s)                                
        nil_test.go:55: Got None. == Got None. 
--- FAIL: TestServer/Fail_for_no_reason (0.00s)
nil_test.go:59: + != -
FAIL
exit status 1
FAIL command-line-arguments 0.003s
主站蜘蛛池模板: 黄陵县| 留坝县| 浮山县| 广饶县| 达拉特旗| 瑞昌市| 和林格尔县| 彰武县| 额济纳旗| 高陵县| 通江县| 奈曼旗| 封丘县| 曲靖市| 台东市| 台东市| 石河子市| 视频| 迁安市| 平谷区| 寻甸| 宜兰县| 拉萨市| 岳阳市| 合肥市| 柯坪县| 盈江县| 临武县| 鄂托克旗| 手机| 长泰县| 文安县| 镇雄县| 上杭县| 古浪县| 河源市| 康平县| 安岳县| 酉阳| 揭阳市| 年辖:市辖区|