mirror of
https://github.com/golang/go
synced 2024-11-05 15:16:11 -07:00
50c38d46e8
This change adds support for Fortran files (.f, .F, .for, .f90) to the go tool, in a similar fashion to Objective-C/C++. Only gfortran is supported out of the box so far but leaves other Fortran compiler toolchains the ability to pass the correct link options via CGO_LDFLAGS. A simple test (misc/cgo/fortran) has been added and plugged into the general test infrastructure. This test is only enabled when the $FC environment variable is defined (or if 'gfortran' was found in $PATH.) Derived from CL 4114. Change-Id: Ifc855091942f95c6e9b17d91c17ceb4eee376408 Reviewed-on: https://go-review.googlesource.com/19670 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
14 lines
334 B
Go
14 lines
334 B
Go
// Copyright 2016 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package fortran
|
|
|
|
import "testing"
|
|
|
|
func TestFortran(t *testing.T) {
|
|
if a := TheAnswer(); a != 42 {
|
|
t.Errorf("Unexpected result for The Answer. Got: %d Want: 42", a)
|
|
}
|
|
}
|