gfortran: use test DSL

master
Jack Nagel 2013-02-01 23:12:35 -06:00
parent 115ea8e68d
commit 15334278d8
1 changed files with 15 additions and 17 deletions

View File

@ -94,24 +94,22 @@ class Gfortran < Formula
# (share/'locale').rmtree
end
def test
mktemp do
fixture = <<-EOS.undent
integer,parameter::m=10000
real::a(m), b(m)
real::fact=0.5
test do
fixture = <<-EOS.undent
integer,parameter::m=10000
real::a(m), b(m)
real::fact=0.5
do concurrent (i=1:m)
a(i) = a(i) + fact*b(i)
end do
print *, "done"
end
EOS
Pathname('in.f90').write(fixture)
system "#{bin}/gfortran -c in.f90"
system "#{bin}/gfortran -o test in.o"
`./test`.strip =='done'
end
do concurrent (i=1:m)
a(i) = a(i) + fact*b(i)
end do
print *, "done"
end
EOS
Pathname('in.f90').write(fixture)
system "#{bin}/gfortran -c in.f90"
system "#{bin}/gfortran -o test in.o"
`./test`.strip =='done'
end
def caveats; <<-EOS.undent