cgot

package
v0.63.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 11 Imported by: 0

README

Attention

  • Do not edit generated_cgoPackage.go. Change instead file ../testdata/cgoPackage.go and execute ../updateTestData.sh afterwards. This influences all cgot packages tests.
  • For individual modifications use file cgo_test.go or create an additional file.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL