github.com/streamdal/segmentio-kafka-go@v0.4.47-streamdal/testing/version_test.go (about)

     1  package testing
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestSemVersionAtLeastEmpty(t *testing.T) {
     8  	result := semver([]int{}).atLeast(semver([]int{1, 2}))
     9  	if result {
    10  		t.Errorf("Empty version can't be at least 1.2")
    11  	}
    12  }
    13  
    14  func TestSemVersionAtLeastShorter(t *testing.T) {
    15  	result := semver([]int{1, 1}).atLeast(semver([]int{1, 1, 2}))
    16  	if result {
    17  		t.Errorf("Version 1.1 version can't be at least 1.1.2")
    18  	}
    19  }