github.com/sanprasirt/go@v0.0.0-20170607001320-a027466e4b6d/misc/cgo/test/issue18720.go (about) 1 // Copyright 2017 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package cgotest 6 7 /* 8 #define HELLO "hello" 9 #define WORLD "world" 10 #define HELLO_WORLD HELLO "\000" WORLD 11 */ 12 import "C" 13 import "testing" 14 15 func test18720(t *testing.T) { 16 if C.HELLO_WORLD != "hello\000world" { 17 t.Fatalf(`expected "hello\000world", but got %q`, C.HELLO_WORLD) 18 } 19 }