12345678910111213141516171819 |
- package caller
- import (
- "testing"
- )
- func TestCallInfo(t *testing.T) {
- if CallFilePath() != "/home/yjp/go-projects/src/go-tools/utils/caller/caller_test.go" {
- t.Fatal("调用文件名不一致")
- }
- if CallFunctionName() != "git.sxidc.com/go-tools/utils/caller.TestCallInfo" {
- t.Fatal("调用函数名不一致")
- }
- if CallLineNo() != 16 {
- t.Fatal("调用行数不一致")
- }
- }
|