gitlab.com/SiaPrime/SiaPrime@v1.4.1/types/constants_test.go (about)

     1  package types
     2  
     3  import (
     4  	"testing"
     5  
     6  	"gitlab.com/SiaPrime/SiaPrime/build"
     7  )
     8  
     9  // TestCheckBuildConstants checks that the required build constants have been
    10  // set.
    11  func TestCheckBuildConstants(t *testing.T) {
    12  	// Verify that the build has been set to 'testing'.
    13  	if build.Release != "testing" {
    14  		t.Error("build.Release needs to be set to \"testing\"")
    15  		t.Error(build.Release)
    16  	}
    17  	if testing.Short() {
    18  		t.SkipNow()
    19  	}
    20  	// Verify that, for the longer tests, the 'debug' build tag has been used.
    21  	if !build.DEBUG {
    22  		t.Error("DEBUG needs to be enabled for testing to work.")
    23  		t.Error(build.DEBUG)
    24  	}
    25  }