mirror of https://github.com/subgraph/fw-daemon
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.
21 lines
469 B
21 lines
469 B
7 years ago
|
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")
|
||
|
}
|
||
|
}
|