summaryrefslogtreecommitdiff
path: root/vendor/github.com/gotk3/gotk3/gtk/version_test.go
blob: d68387c7b3fe679c7d44b594b9aec68eac3246c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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")
	}
}