github.com/gotranspile/cxgo@v0.3.8-0.20240118201721-29871598a6a2/libs/reglibs_test.go (about)

     1  package libs
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  
     8  	"github.com/gotranspile/cxgo/types"
     9  )
    10  
    11  var autoRegLibs = []string{
    12  	"AL/alc.h",
    13  	"AL/al.h",
    14  
    15  	"dirent.h",
    16  	"fcntl.h",
    17  	"float.h",
    18  	"getopt.h",
    19  
    20  	"GL/gl.h",
    21  
    22  	"inttypes.h",
    23  	"libgen.h",
    24  	"sched.h",
    25  	"semaphore.h",
    26  	"signal.h",
    27  	"strings.h",
    28  
    29  	"sys/mkdev.h",
    30  	"windows.h",
    31  }
    32  
    33  func TestReglibs(t *testing.T) {
    34  	c := NewEnv(types.Config32())
    35  
    36  	for _, lib := range autoRegLibs {
    37  		_, ok := c.GetLibrary(lib)
    38  		require.True(t, ok)
    39  	}
    40  }