File: version_test.go

package info (click to toggle)
golang-github-gotk3-gotk3 0.6.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,392 kB
  • sloc: ansic: 914; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (5)
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")
	}
}