Documentation ¶
Overview ¶
Package cgot is a helper for testing the target C-code. Each C function gets a Go wrapper which is tested in appropriate test functions. For some reason inside the trice_test.go an 'import "C"' is not possible. The C-files referring to the trice sources this way avoiding code duplication. The Go functions defined here are not exported. They are called by the Go test functions in this package. This way the test functions are executing the trice C-code compiled with the triceConfig.h here. Inside ./testdata this file is named cgoPackage.go where it is maintained. The test/updateTestData.sh script copied this file under the name generated_cgoPackage.go into various package folders, where it is used separately.