github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/cgo/internal/test/test.go (about)

     1  // Copyright 2010 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Test cases for cgo.
     6  // Both the import "C" prologue and the main file are sorted by issue number.
     7  // This file contains C definitions (not just declarations)
     8  // and so it must NOT contain any //export directives on Go functions.
     9  // See testx.go for exports.
    10  
    11  package cgotest
    12  
    13  import "C"
    14  
    15  import (
    16  	"github.com/shogo82148/std/testing"
    17  	"github.com/shogo82148/std/unsafe"
    18  )
    19  
    20  const EINVAL = C.EINVAL
    21  
    22  var KILO = C.KILO
    23  
    24  func Strtol(s string, base int) (int, error)
    25  
    26  func Atol(s string) int
    27  
    28  type Context struct {
    29  	ctx *C.struct_ibv_context
    30  }
    31  
    32  func TestComplexAlign(t *testing.T)
    33  
    34  // issue 1222
    35  type AsyncEvent struct {
    36  	event C.struct_ibv_async_event
    37  }
    38  
    39  var _ = C.struct_issue8428one{
    40  	b: C.char(0),
    41  }
    42  
    43  var _ = C.struct_issue8428two{
    44  	p:    unsafe.Pointer(nil),
    45  	b:    C.char(0),
    46  	rest: [0]C.char{},
    47  }
    48  
    49  var _ = C.struct_issue8428three{
    50  	w: [1][2][3][0]C.char{},
    51  	x: [2][3][0][1]C.char{},
    52  	y: [3][0][1][2]C.char{},
    53  	z: [0][1][2][3]C.char{},
    54  }
    55  
    56  var _ C.complexfloat
    57  var _ C.complexdouble
    58  
    59  var _, _ = C.abs(0)
    60  
    61  // issue 22958
    62  // Nothing to run, just make sure this compiles.
    63  var Vissue22958 C.issue22958Type
    64  
    65  func Issue23720F()
    66  
    67  func Issue29383(n, size uint) int
    68  
    69  var Vissue29748 = C.f29748(&C.S29748{
    70  	nil,
    71  })
    72  
    73  func Fissue299748()
    74  
    75  func Issue31093()
    76  
    77  func Issue40494()