github.com/stingnevermore/go@v0.0.0-20180120041312-3810f5bfed72/misc/cgo/test/issue21708.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  // #include <stdint.h>
     8  // #define CAST_TO_INT64 (int64_t)(-1)
     9  import "C"
    10  import "testing"
    11  
    12  func test21708(t *testing.T) {
    13  	if got, want := C.CAST_TO_INT64, -1; got != want {
    14  		t.Errorf("C.CAST_TO_INT64 == %v, expected %v", got, want)
    15  	}
    16  }