Files
tinygo/testdata/errors/cgo.go
T
Ayke van Laethem 8a357af3d8 all: add testing for compiler error messages
This is needed for some improvements I'm going to make next.

This commit also refactors error handling slightly to make it more
easily testable, this should hopefully not result in any actual changes
in behavior.
2024-07-13 13:26:26 +02:00

16 lines
339 B
Go

package main
// #error hello
// )))
import "C"
func main() {
}
// TODO: this error should be relative to the current directory (so cgo.go
// instead of testdata/errors/cgo.go).
// ERROR: # command-line-arguments
// ERROR: testdata/errors/cgo.go:3:5: error: hello
// ERROR: testdata/errors/cgo.go:4:4: error: expected identifier or '('