aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2013-02-01 23:12:35 -0600
committerJack Nagel2013-02-01 23:38:51 -0600
commit957ab9cfd9ce4771da932c04a4e16fcf1f130bb4 (patch)
tree6897627540cce3620340ba90d276e577ee4d1a9c /Library/Formula
parent0c4beb1d37424ed117fb5542493d59d389a25a2f (diff)
downloadhomebrew-957ab9cfd9ce4771da932c04a4e16fcf1f130bb4.tar.bz2
gfortran: use test DSL
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/gfortran.rb34
1 files changed, 16 insertions, 18 deletions
diff --git a/Library/Formula/gfortran.rb b/Library/Formula/gfortran.rb
index f872775a5..794b8419f 100644
--- a/Library/Formula/gfortran.rb
+++ b/Library/Formula/gfortran.rb
@@ -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
-
- 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
+ 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
def caveats; <<-EOS.undent