1 // Copyright 2014 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.
10 complex float complexFloatSquared(complex float a) { return a*a; }
11 complex double complexDoubleSquared(complex double a) { return a*a; }
20 func test8694(t *testing.T) {
21 if runtime.GOARCH == "arm" {
22 t.Skip("test8694 is disabled on ARM because 5l cannot handle thumb library.")
24 // Really just testing that this compiles, but check answer anyway.
25 x := C.complexfloat(2 + 3i)
27 cx2 := C.complexFloatSquared(x)
29 t.Errorf("C.complexFloatSquared(%v) = %v, want %v", x, cx2, x2)
32 y := C.complexdouble(2 + 3i)
34 cy2 := C.complexDoubleSquared(y)
36 t.Errorf("C.complexDoubleSquared(%v) = %v, want %v", y, cy2, y2)