1package cgo_pthread_flag 2 3import "testing" 4 5// Checks that we can build and run pthread code without explicitly giving 6// any flags to cgo. -pthread should be passed to the C compiler by default. 7func TestCgoPthread(t *testing.T) { 8 x := int(callFFromGo()) 9 if x != 42 { 10 t.Errorf("got %d; want 42", x) 11 } 12} 13