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

Running tests in addInt_test.go

Let's now run the tests in this file, and we are expecting each of the row in the testCases table, which we ran, to be treated as a separate test:

$ go test -v ./{addInt.go,addInt_test.go}                           
=== RUN   TestAddInt                       
=== RUN   TestAddInt/addInt()_->_0         
=== RUN   TestAddInt/addInt([]int{10,_20,_100})_->_130                                
--- PASS: TestAddInt (0.00s)               
    --- PASS: TestAddInt/addInt()_->_0 (0.00s)                                        
        addInt_test.go:23: 0 == 0          
    --- PASS: TestAddInt/addInt([]int{10,_20,_100})_->_130 (0.00s)                    
        addInt_test.go:23: 130 == 130      
PASS                                       
ok      command-line-arguments  0.001s       
主站蜘蛛池模板: 环江| 那曲县| 房山区| 广丰县| 黄山市| 吴江市| 滁州市| 叶城县| 龙门县| 丰都县| 邵东县| 临邑县| 桦南县| 民丰县| 黎川县| 苏尼特左旗| 双鸭山市| 岢岚县| 高州市| 姜堰市| 蒙自县| 巴彦县| 美姑县| 蓬安县| 通渭县| 东丽区| 获嘉县| 遵化市| 新乐市| 清原| 寻甸| 麻阳| 苗栗县| 津南区| 焉耆| 滁州市| 高安市| 高青县| 买车| 本溪| 英山县|