Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

单元测试

1. 测试指定文件名 name_test.go

package nsqm

import (
    "testing"
)

func TestNsq(t *testing.T){

}

2. 运行

# -test.run funName   指定执行测试方法名
go test -v nsqm -test.run TestNsq