(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestGetBuildInfo(t *testing.T) { |
| 11 | info := GetBuildInfo() |
| 12 | |
| 13 | if info == nil { |
| 14 | t.Fatal("GetBuildInfo() returned nil") |
| 15 | } |
| 16 | |
| 17 | // Check that required fields are present |
| 18 | if info.Version == "" { |
| 19 | t.Error("Version should not be empty") |
| 20 | } |
| 21 | |
| 22 | if info.GoVersion == "" { |
| 23 | t.Error("GoVersion should not be empty") |
| 24 | } |
| 25 | |
| 26 | if info.OS == "" { |
| 27 | t.Error("OS should not be empty") |
| 28 | } |
| 29 | |
| 30 | if info.Arch == "" { |
| 31 | t.Error("Arch should not be empty") |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | func TestGetVersionString(t *testing.T) { |
| 36 | versionStr := GetVersionString() |
nothing calls this directly
no test coverage detected