cgo: do type checking in CGo testing

Such type checking should hopefully catch more bugs.

This commit also fixes some existing type errors.
This commit is contained in:
Ayke van Laethem
2019-11-06 14:54:34 +01:00
committed by Ron Evans
parent 913131bf62
commit 473576e756
2 changed files with 39 additions and 4 deletions
+4 -4
View File
@@ -92,16 +92,16 @@ var (
// Arrays.
_ C.myIntArray
_ C.myIntArrayPtr
)
// Test bitfield accesses.
func foo() {
var x C.bitfield_t
x.start = 3
x.a = 4
x.b = 1
x.c = 2
x.set_bitfield_a(4)
x.set_bitfield_b(1)
x.set_bitfield_c(2)
x.d = 10
x.e = 5
var _ C.uchar = x.bitfield_a()
}