gfortran: use test DSL
parent
115ea8e68d
commit
15334278d8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue