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. 4 5package cgotest 6 7// #include <stdlib.h> 8import "C" 9 10import "testing" 11 12func test6390(t *testing.T) { 13 p1 := C.malloc(1024) 14 if p1 == nil { 15 t.Fatalf("C.malloc(1024) returned nil") 16 } 17 p2 := C.malloc(0) 18 if p2 == nil { 19 t.Fatalf("C.malloc(0) returned nil") 20 } 21 C.free(p1) 22 C.free(p2) 23} 24