You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts/cgo.txt

29 lines
387 B
Plaintext

garble build
exec ./main
cmp stderr main.stderr
binsubstr main$exe 'privateAdd'
[short] stop # no need to verify this with -short
go build
exec ./main
cmp stderr main.stderr
-- go.mod --
module test/main
-- main.go --
package main
/*
static int privateAdd(int a, int b) {
return a + b;
}
*/
import "C"
func main() {
println(C.privateAdd(C.int(1), C.int(2)))
}
-- main.stderr --
3