mirror of
https://github.com/golang/go
synced 2024-11-15 03:10:22 -07:00
2b9f3fcead
Fixes #8478. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/122150043
21 lines
559 B
Bash
Executable File
21 lines
559 B
Bash
Executable File
# Copyright 2014 The Go Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style
|
|
# license that can be found in the LICENSE file.
|
|
|
|
# We are testing cgo -godefs, which translates Go files that use
|
|
# import "C" into Go files with Go definitions of types defined in the
|
|
# import "C" block. Add more tests here.
|
|
FILE_PREFIXES="anonunion issue8478"
|
|
|
|
RM=
|
|
for FP in $FILE_PREFIXES
|
|
do
|
|
go tool cgo -godefs ${FP}.go > ${FP}_defs.go
|
|
RM="${RM} ${FP}_defs.go"
|
|
done
|
|
|
|
go build . && ./testgodefs
|
|
EXIT=$?
|
|
rm -rf _obj testgodefs ${RM}
|
|
exit $EXIT
|