2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2012 The Go Authors. All rights reserved.
|
2012-09-02 20:12:51 -06:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package cgotest
|
|
|
|
|
|
|
|
// Test that cgo reserves enough stack space during cgo call.
|
2015-07-10 17:17:11 -06:00
|
|
|
// See https://golang.org/issue/3945 for details.
|
2012-09-02 20:12:51 -06:00
|
|
|
|
|
|
|
// #include <stdio.h>
|
|
|
|
//
|
|
|
|
// void say() {
|
|
|
|
// printf("%s from C\n", "hello");
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func testPrintf(t *testing.T) {
|
|
|
|
C.say()
|
|
|
|
}
|