3 // This file appears in its own package since the assertion tests the
4 // per-package counter used to create fresh identifiers.
7 typedef struct { int i; } git_merge_file_input;
9 typedef struct { int j; } git_merge_file_options;
12 git_merge_file_input *in,
13 git_merge_file_options *opts) {}
21 func Test(t *testing.T) {
22 var in C.git_merge_file_input
23 var opts *C.git_merge_file_options
24 C.git_merge_file(&in, opts)
26 // Test that the generated type names are deterministic.
27 // (Previously this would fail about 10% of the time.)
29 // Brittle: the assertion may fail spuriously when the algorithm
30 // changes, but should remain stable otherwise.
31 got := fmt.Sprintf("%T %T", in, opts)
32 want := "issue9026._Ctype_struct___0 *issue9026._Ctype_struct___1"
34 t.Errorf("Non-deterministic type names: got %s, want %s", got, want)