github.com/ipld/go-ipld-prime@v0.21.0/schema/gen/go/testStructsContainingMaybe_test.go (about)

     1  package gengo
     2  
     3  import (
     4  	"runtime"
     5  	"testing"
     6  
     7  	"github.com/ipld/go-ipld-prime/node/tests"
     8  	"github.com/ipld/go-ipld-prime/schema"
     9  )
    10  
    11  func TestStructsContainingMaybe(t *testing.T) {
    12  	if runtime.GOOS != "darwin" { // TODO: enable parallelism on macos
    13  		t.Parallel()
    14  	}
    15  
    16  	for _, engine := range []*genAndCompileEngine{
    17  		{
    18  			subtestName: "maybe-using-embed",
    19  			prefix:      "stroct",
    20  			adjCfg: AdjunctCfg{
    21  				maybeUsesPtr: map[schema.TypeName]bool{"String": false},
    22  			},
    23  		},
    24  		{
    25  			subtestName: "maybe-using-ptr",
    26  			prefix:      "stroct2",
    27  			adjCfg: AdjunctCfg{
    28  				maybeUsesPtr: map[schema.TypeName]bool{"String": false},
    29  			},
    30  		},
    31  	} {
    32  		t.Run(engine.subtestName, func(t *testing.T) {
    33  			tests.SchemaTestStructsContainingMaybe(t, engine)
    34  		})
    35  	}
    36  }