技术宅,fat-man

增加语言的了解程度可以避免写出愚蠢的代码

导航

2013年6月3日 #

go语言单元测试demo

摘要: package mymathfunc Add(a, b int) int { return a + b}func Max(a, b int) (ret int) { ret = a if b > a { ret = b } return}package mymath_testimport ( "mymath" "testing")type mathTest struct { a, b, ret int}var addTest = []mathTest{ mathTest{4, 6, 10}, mathTest{5, 6,... 阅读全文

posted @ 2013-06-03 17:14 codestyle 阅读(300) 评论(0) 推荐(0)