gotest/version/data_test.go

23 lines
397 B
Go

package version
import (
"runtime"
"testing"
)
func TestGoVersion(t *testing.T) {
got := GoVersion
expected := runtime.Version()
if got != expected {
t.Errorf("Expected: %s ; Got: %s", got, expected)
}
}
func TestOsArch(t *testing.T) {
got := OsArch
expected := runtime.GOOS + " (" + runtime.GOARCH + ")"
if got != expected {
t.Errorf("Expected: %s ; Got: %s", got, expected)
}
}