You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fw-daemon/vendor/github.com/gotk3/gogtk3/gtk/version_test.go

21 lines
469 B

package gtk
import "testing"
func TestCheckVersion(t *testing.T) {
err := CheckVersion(GetMajorVersion(), GetMinorVersion(), GetMicroVersion())
if err != nil {
t.Error(err)
}
err = CheckVersion(GetMajorVersion(), GetMinorVersion(), GetMicroVersion()-1)
if err != nil {
t.Error(err)
}
err = CheckVersion(GetMajorVersion(), GetMinorVersion(), GetMicroVersion()+1)
if err == nil {
t.Error("Expected to fail when an more recent version is expected")
}
}