diff options
Diffstat (limited to 'cgo/testdata/errors.go')
-rw-r--r-- | cgo/testdata/errors.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cgo/testdata/errors.go b/cgo/testdata/errors.go index 7ca5b7960..e5e809881 100644 --- a/cgo/testdata/errors.go +++ b/cgo/testdata/errors.go @@ -13,10 +13,14 @@ typedef someType noType; // undefined type #define SOME_CONST_1 5) // invalid const syntax #define SOME_CONST_2 6) // const not used (so no error) #define SOME_CONST_3 1234 // const too large for byte +#define SOME_CONST_b 3 ) // const with lots of weird whitespace (to test error locations) +# define SOME_CONST_startspace 3) */ // // // #define SOME_CONST_4 8) // after some empty lines +// #cgo CFLAGS: -DSOME_PARAM_CONST_invalid=3/+3 +// #cgo CFLAGS: -DSOME_PARAM_CONST_valid=3+4 import "C" // #warning another warning @@ -24,6 +28,7 @@ import "C" // Make sure that errors for the following lines won't change with future // additions to the CGo preamble. +// //line errors.go:100 var ( // constant too large @@ -38,4 +43,12 @@ var ( _ byte = C.SOME_CONST_3 _ = C.SOME_CONST_4 + + _ = C.SOME_CONST_b + + _ = C.SOME_CONST_startspace + + // constants passed by a command line parameter + _ = C.SOME_PARAM_CONST_invalid + _ = C.SOME_PARAM_CONST_valid ) |