最近希望為golang寫一個單元測試。功能如下。func (s *containerStats) Display(w io.Writer) error { fmt.Fprintf(w, "%s %s\n", "hello", "world") return nil}那么如何測試“func Display”的結(jié)果是“hello world”呢?
- 1 回答
- 0 關(guān)注
- 209 瀏覽
添加回答
舉報
0/150
提交
取消