introduce TDF_compare_debug, omit OBJ_TYPE_REF casts with it
[official-gcc.git] / libgo / misc / cgo / test / issue6833.go
blobde60dbfcf2033b267eb5ec2ea06bdb09c35d7c26
1 // Copyright 2013 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.
5 package cgotest
7 /*
8 extern unsigned long long issue6833Func(unsigned int, unsigned long long);
9 */
10 import "C"
12 import "testing"
14 //export GoIssue6833Func
15 func GoIssue6833Func(aui uint, aui64 uint64) uint64 {
16 return aui64 + uint64(aui)
19 func test6833(t *testing.T) {
20 ui := 7
21 ull := uint64(0x4000300020001000)
22 v := uint64(C.issue6833Func(C.uint(ui), C.ulonglong(ull)))
23 exp := uint64(ui) + ull
24 if v != exp {
25 t.Errorf("issue6833Func() returns %x, expected %x", v, exp)