github.com/leanovate/gopter@v0.2.9/gen/fail_test.go (about)

     1  package gen_test
     2  
     3  import (
     4  	"reflect"
     5  	"testing"
     6  
     7  	"github.com/leanovate/gopter/gen"
     8  )
     9  
    10  func TestFail(t *testing.T) {
    11  	fail := gen.Fail(reflect.TypeOf(""))
    12  
    13  	value, ok := fail.Sample()
    14  
    15  	if value != nil || ok {
    16  		t.Fail()
    17  	}
    18  }