Documentation
¶
Overview ¶
Package layouttest is the helper for the layout test that every Go mirror of a C struct needs (SPEC §8.1 rule 3). It imports package testing, so only test files import it: package dl, which every program that loads a C library links, does not.
Flutter: no counterpart.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertLayout ¶
AssertLayout is a test helper for the layout test that every Go mirror of a C struct needs (SPEC §8.1 rule 3). It checks that the struct value got has the given size and the given field offsets, as taken from the C headers and recorded in the test. Every named field of got must be listed in offsets, so that a field added later cannot escape the test. Fields named "_" are padding and are skipped. It reports every difference with t.Errorf.
Flutter: no counterpart
Types ¶
This section is empty.