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

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
主站蜘蛛池模板: 噶尔县| 古田县| 正阳县| 芜湖市| 应城市| 柏乡县| 调兵山市| 文昌市| 浮山县| 南投市| 西华县| 共和县| 涡阳县| 天全县| 新野县| 通河县| 德州市| 中江县| 陇南市| 洛隆县| 泗洪县| 克拉玛依市| 从江县| 灌云县| 祁阳县| 驻马店市| 台北市| 光山县| 都昌县| 娱乐| 福安市| 山阳县| 安阳市| 称多县| 榕江县| 利津县| 麻城市| 壤塘县| 平安县| 嫩江县| 齐齐哈尔市|