21 lines
398 B
Go
21 lines
398 B
Go
package version
|
|
|
|
import "testing"
|
|
import "runtime"
|
|
|
|
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)
|
|
}
|
|
}
|