fUnit 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. data/README +16 -15
  2. data/Rakefile +1 -1
  3. data/bin/funit +1 -1
  4. data/docs/html/classes/Funit.html +20 -22
  5. data/docs/html/classes/Funit/Assertions.html +1 -1
  6. data/docs/html/classes/Funit/Compiler.html +3 -3
  7. data/docs/html/classes/Funit/TestSuite.html +43 -43
  8. data/docs/html/created.rid +1 -1
  9. data/docs/html/files/README.html +22 -25
  10. data/docs/html/files/lib/funit/assertions_rb.html +1 -1
  11. data/docs/html/files/lib/funit/functions_rb.html +1 -1
  12. data/docs/html/files/lib/funit/test_suite_rb.html +10 -1
  13. data/docs/html/files/lib/funit_rb.html +1 -1
  14. data/docs/html/fr_method_index.html +2 -2
  15. data/examples/CFD/{FluxFunctionsMT.ftk → FluxFunctions.fun} +1 -1
  16. data/examples/CFD/{GasModelMT.ftk → GasModel.fun} +1 -1
  17. data/examples/StopWatch/{StopWatchMT.ftk → StopWatch.fun} +0 -0
  18. data/lib/funit.rb +4 -6
  19. data/lib/funit/assertions.rb +1 -1
  20. data/lib/funit/functions.rb +20 -20
  21. data/lib/funit/test_suite.rb +43 -38
  22. data/tests/tc_compile.rb +7 -4
  23. data/tests/tc_fortran_deps.rb +3 -0
  24. data/tests/tc_funit.rb +30 -16
  25. data/tests/tc_test_suite.rb +29 -31
  26. metadata +4 -17
  27. data/examples/CFD/FluxFunctionsMT.f90 +0 -336
  28. data/examples/CFD/GasModelMT.f90 +0 -173
  29. data/examples/CFD/TestRunner +0 -0
  30. data/examples/CFD/TestRunner.f90 +0 -23
  31. data/examples/CFD/fluxfunctions.mod +0 -45
  32. data/examples/CFD/gammas.mod +0 -20
  33. data/examples/CFD/gasmodel.mod +0 -30
  34. data/examples/CFD/gasmodelmt.mod +0 -27
  35. data/examples/StopWatch/StopWatchMT.f90 +0 -343
  36. data/examples/StopWatch/TestRunner +0 -0
  37. data/examples/StopWatch/TestRunner.f90 +0 -23
  38. data/examples/StopWatch/stopwatch.mod +0 -34
  39. data/examples/StopWatch/stopwatchmt.mod +0 -27
@@ -1 +1 @@
1
- Sat Apr 15 10:41:36 EDT 2006
1
+ Sat Apr 15 17:13:05 EDT 2006
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sat Apr 15 10:41:30 EDT 2006</td>
59
+ <td>Sat Apr 15 17:12:55 EDT 2006</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -100,7 +100,7 @@ href="http://rubyforge.org/projects/funit">rubyforge.org/projects/funit</a>
100
100
  </ul>
101
101
  <h2>Requirements</h2>
102
102
  <ol>
103
- <li>A Fortran 90/95/2003 compiler (set via F9X environment variable)
103
+ <li>A Fortran 90/95/2003 compiler (set via FC environment variable)
104
104
 
105
105
  </li>
106
106
  <li><a href="http://www.ruby-lang.org/">The Ruby language</a> with the <a
@@ -130,7 +130,7 @@ routine that returns viscosity as a function of temperature,
130
130
  end module
131
131
  </pre>
132
132
  <p>
133
- The tests of this module would be contained in <tt>gas_physicsMT.ftk</tt>,
133
+ The tests of this module would be contained in <tt>gas_physics.fun</tt>,
134
134
  and might contain a test like,
135
135
  </p>
136
136
  <pre>
@@ -153,18 +153,17 @@ command,
153
153
  funit gas_physics
154
154
  </pre>
155
155
  <p>
156
- which would transform your fragments contained in
157
- <tt>gas_physicsMT.ftk</tt> into valid Fortran code, create a test runner
158
- program, compile everything, and run the tests. A sample output would look
159
- like,
156
+ which would transform your fragments contained in <tt>gas_physics.fun</tt>
157
+ into valid Fortran code, create a test runner program, compile everything,
158
+ and run the tests. A sample output would look like,
160
159
  </p>
161
160
  <pre>
162
- parsing gas_physicsMT.ftk
161
+ parsing gas_physics.fun
163
162
  computing dependencies
164
163
  locating associated source files and sorting for compilation
165
164
  g95 -o TestRunner
166
165
  gas_physics.f90 \
167
- gas_physicsMT.f90 \
166
+ gas_physics_fun.f90 \
168
167
  TestRunner.f90
169
168
 
170
169
  gas_physics test suite:
@@ -172,15 +171,18 @@ like,
172
171
  </pre>
173
172
  <h2>Support</h2>
174
173
  <p>
175
- Send email to funit-support@rubyforge.org or submit a request through <a
176
- href="http://rubyforge.org/tracker/?group_id=1416">rubyforge.org/tracker/?group_id=1416</a>.
174
+ Send email to <a
175
+ href="mailto:funit-support@rubyforge.org">funit-support@rubyforge.org</a>
176
+ or submit a request through <a
177
+ href="http://rubyforge.org/tracker/?group_id=1416">the tracking system</a>.
177
178
  </p>
178
179
  <h2>License</h2>
179
180
  <p>
180
181
  FUnit is released under the NASA Open Source Agreement, which requests
181
- registration. If you would like to register, send an email to
182
- funit-support@rubyforge.org with your name, institution (if applicable),
183
- city, postal code, and country. See <a
182
+ registration. If you would like to register, send an email to <a
183
+ href="mailto:funit-registration@rubyforge.org?subject=fUnit%20Registration">funit-registration@rubyforge.org</a>
184
+ with your name, institution (if applicable), city, postal code, and
185
+ country. See <a
184
186
  href="http://funit.rubyforge.org/files/COPYING.html">COPYING</a> for
185
187
  details.
186
188
  </p>
@@ -209,14 +211,17 @@ framework in <a href="http:www.ruby-lang.org">Ruby</a>.
209
211
  <li>Make tests fail gracefully if Fortran compiler is not found.
210
212
 
211
213
  </li>
212
- <li>Complete migration rom CamelCase to snake_case for methods and variables.
214
+ <li>Complete migration from CamelCase to snake_case for methods and variables.
215
+
216
+ </li>
217
+ <li>Use 2-space indentation everywhere.
213
218
 
214
219
  </li>
215
220
  <li>Use &#8216;test&#8217; keyword instead of &#8216;beginTest&#8217; business.
216
221
 
217
222
  </li>
218
- <li>Don&#8216;t add to test name during translation to avoid 32 character limit
219
- trouble.
223
+ <li>Don&#8216;t add to test name during translation to avoid Fortran&#8217;s
224
+ 32-character limit on names.
220
225
 
221
226
  </li>
222
227
  <li>Rename assertions to more consistent with other xUnits.
@@ -238,14 +243,6 @@ href="http://www.erikveen.dds.nl/rubyscript2exe/">RubyScript2Exe</a>.
238
243
  </li>
239
244
  <li>Add a clean option to remove all generated artifacts.
240
245
 
241
- </li>
242
- <li>Migrate to a new naming convention? E.g., gas_physics.fun -&gt;
243
- gas_physics_fun.f90
244
-
245
- </li>
246
- <li>Change Fortran envinoment variable from <tt>F9X</tt> to GNU-standard
247
- <tt>FC</tt>.
248
-
249
246
  </li>
250
247
  </ul>
251
248
 
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Apr 13 15:31:36 EDT 2006</td>
59
+ <td>Sat Apr 15 11:39:27 EDT 2006</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Apr 13 15:33:45 EDT 2006</td>
59
+ <td>Sat Apr 15 16:13:09 EDT 2006</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Apr 13 15:34:19 EDT 2006</td>
59
+ <td>Sat Apr 15 16:53:46 EDT 2006</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -75,6 +75,15 @@ Create test suite wrapper code
75
75
 
76
76
  </div>
77
77
 
78
+ <div id="requires-list">
79
+ <h3 class="section-bar">Required files</h3>
80
+
81
+ <div class="name-list">
82
+ funit/assertions&nbsp;&nbsp;
83
+ funit/functions&nbsp;&nbsp;
84
+ ftools&nbsp;&nbsp;
85
+ </div>
86
+ </div>
78
87
 
79
88
  </div>
80
89
 
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Apr 13 15:30:12 EDT 2006</td>
59
+ <td>Sat Apr 15 16:31:38 EDT 2006</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -30,7 +30,7 @@
30
30
  <a href="classes/Funit/Depend.html#M000022">dependencies (Funit::Depend)</a><br />
31
31
  <a href="classes/Funit/TestSuite.html#M000028">expand (Funit::TestSuite)</a><br />
32
32
  <a href="classes/Funit/Depend.html#M000019">fortran_files_within (Funit::Depend)</a><br />
33
- <a href="classes/Funit.html#M000003">ftkExists? (Funit)</a><br />
33
+ <a href="classes/Funit.html#M000003">funit_exists? (Funit)</a><br />
34
34
  <a href="classes/Funit/TestSuite.html#M000031">ignoreTest (Funit::TestSuite)</a><br />
35
35
  <a href="classes/Funit/Assertions.html#M000013">isequal (Funit::Assertions)</a><br />
36
36
  <a href="classes/Funit/Assertions.html#M000012">isequalwithin (Funit::Assertions)</a><br />
@@ -46,7 +46,7 @@
46
46
  <a href="classes/Funit.html#M000004">parseCommandLine (Funit)</a><br />
47
47
  <a href="classes/Funit.html#M000002">requestedModules (Funit)</a><br />
48
48
  <a href="classes/Funit/Depend.html#M000024">required_source_files (Funit::Depend)</a><br />
49
- <a href="classes/Funit.html#M000001">runAllFtks (Funit)</a><br />
49
+ <a href="classes/Funit.html#M000001">run_tests (Funit)</a><br />
50
50
  <a href="classes/Funit/Depend.html#M000023">source_file_dependencies (Funit::Depend)</a><br />
51
51
  <a href="classes/Funit.html#M000006">syntaxError (Funit)</a><br />
52
52
  <a href="classes/Funit/TestSuite.html#M000027">topWrapper (Funit::TestSuite)</a><br />
@@ -1,4 +1,4 @@
1
- ! $Id: FluxFunctionsMT.ftk 139 2006-04-09 05:17:47Z kleb $
1
+ ! $Id: FluxFunctions.fun 150 2006-04-15 21:07:25Z kleb $
2
2
 
3
3
  real :: leftState, rightState, interfaceFlux
4
4
 
@@ -1,4 +1,4 @@
1
- ! $Id: GasModelMT.ftk 139 2006-04-09 05:17:47Z kleb $
1
+ ! $Id: GasModel.fun 150 2006-04-15 21:07:25Z kleb $
2
2
 
3
3
  real :: Pressure, Density, Energy
4
4
 
@@ -15,14 +15,12 @@ require 'funit/assertions'
15
15
  require 'funit/test_suite'
16
16
 
17
17
  module Funit
18
- def runAllFtks
19
- Compiler.new # a test for compiler env set (remove this later)
18
+ def run_tests
19
+ Compiler.new# a test for compiler env set (remove this later)
20
20
  writeTestRunner(testSuites = parseCommandLine)
21
21
 
22
- # convert each *MT.ftk file into a pure Fortran9x file:
23
- testSuites.each do |testSuite|
24
- testSuiteF90 = TestSuite.new(testSuite)
25
- end
22
+ # convert each *.fun file into a Fortran file:
23
+ testSuites.each{ |ts| TestSuite.new(ts) }
26
24
 
27
25
  compileTests testSuites
28
26
 
@@ -66,7 +66,7 @@ module Funit
66
66
  if (noAssertFailed) then
67
67
  if (#@condition) then
68
68
  print *, " *#@type failed* in test #@testName &
69
- &[#{@suiteName}MT.ftk:#{@lineNumber.to_s}]"
69
+ &[#{@suiteName}.fun:#{@lineNumber.to_s}]"
70
70
  print *, " ", #@message
71
71
  print *, ""
72
72
  noAssertFailed = .false.
@@ -14,14 +14,14 @@ module Funit
14
14
 
15
15
  attr_reader :name
16
16
 
17
- def initialize( name=ENV['F9X'] )
17
+ def initialize( name=ENV['FC'] )
18
18
  errorMessage = <<-ENVIRON
19
19
 
20
- Fortran compiler environment variable 'F9X' not set:
20
+ Fortran compiler environment variable 'FC' not set:
21
21
 
22
- for bourne-based shells: export F9X=lf95 (in .profile)
23
- for c-based shells: setenv F9X lf95 (in .login)
24
- for windows: set F9X=C:\\Program Files\\lf95 (in autoexec.bat)
22
+ for bourne-based shells: export FC=lf95 (in .profile)
23
+ for c-based shells: setenv FC lf95 (in .login)
24
+ for windows: set FC=C:\\Program Files\\lf95 (in autoexec.bat)
25
25
 
26
26
  ENVIRON
27
27
  raise(errorMessage) unless @name = name
@@ -31,13 +31,13 @@ Fortran compiler environment variable 'F9X' not set:
31
31
 
32
32
  def requestedModules(moduleNames)
33
33
  if (moduleNames.empty?)
34
- moduleNames = Dir["*MT.ftk"].each{ |mod| mod.chomp! "MT.ftk" }
34
+ moduleNames = Dir["*.fun"].each{ |mod| mod.chomp! ".fun" }
35
35
  end
36
36
  moduleNames
37
37
  end
38
38
 
39
- def ftkExists?(moduleName)
40
- File.exists? moduleName+"MT.ftk"
39
+ def funit_exists?(moduleName)
40
+ File.exists? moduleName+".fun"
41
41
  end
42
42
 
43
43
  def parseCommandLine
@@ -49,14 +49,14 @@ Fortran compiler environment variable 'F9X' not set:
49
49
  end
50
50
 
51
51
  moduleNames.each do |mod|
52
- unless ftkExists?(mod)
53
- errorMessage = <<-FTKDOESNOTEXIST
54
- Error: could not find test suite #{mod}MT.ftk
52
+ unless funit_exists?(mod)
53
+ errorMessage = <<-FUNITDOESNOTEXIST
54
+ Error: could not find test suite #{mod}.fun
55
55
  Test suites available in this directory:
56
56
  #{requestedModules([]).join(' ')}
57
57
 
58
- Usage: #{File.basename $0} [test names (w/o MT.ftk suffix)]
59
- FTKDOESNOTEXIST
58
+ Usage: #{File.basename $0} [test names (w/o .fun suffix)]
59
+ FUNITDOESNOTEXIST
60
60
  raise errorMessage
61
61
  end
62
62
  end
@@ -69,15 +69,15 @@ Fortran compiler environment variable 'F9X' not set:
69
69
  testRunner = File.new "TestRunner.f90", "w"
70
70
 
71
71
  testRunner.puts <<-HEADER
72
- ! TestRunner.f90 - runs Fortran mobility test suites
72
+ ! TestRunner.f90 - runs test suites
73
73
  !
74
- ! [Dynamically generated by #{File.basename $0} Ruby script #{Time.now}.]
74
+ ! #{File.basename $0} generated this file on #{Time.now}.
75
75
 
76
76
  program TestRunner
77
77
 
78
78
  HEADER
79
79
 
80
- testSuites.each { |testSuite| testRunner.puts " use #{testSuite}MT" }
80
+ testSuites.each { |testSuite| testRunner.puts " use #{testSuite}_fun" }
81
81
 
82
82
  testRunner.puts <<-DECLARE
83
83
 
@@ -91,7 +91,7 @@ program TestRunner
91
91
 
92
92
  print *, ""
93
93
  print *, "#{testSuite} test suite:"
94
- call MT#{testSuite}( numTests, &
94
+ call test_#{testSuite}( numTests, &
95
95
  numAsserts, numAssertsTested, numFailures )
96
96
  print *, "Passed", numAssertsTested, "of", numAsserts, &
97
97
  "possible asserts comprising", &
@@ -106,11 +106,11 @@ program TestRunner
106
106
  end
107
107
 
108
108
  def syntaxError( message, testSuite )
109
- raise "\n *Error: #{message} [#{testSuite}MT.ftk:#$.]\n\n"
109
+ raise "\n *Error: #{message} [#{testSuite}.fun:#$.]\n\n"
110
110
  end
111
111
 
112
112
  def warning( message, testSuite )
113
- $stderr.puts "\n *Warning: #{message} [#{testSuite}MT.ftk:#$.]"
113
+ $stderr.puts "\n *Warning: #{message} [#{testSuite}.fun:#$.]"
114
114
  end
115
115
 
116
116
  def compileTests testSuites
@@ -119,7 +119,7 @@ program TestRunner
119
119
  puts "locating associated source files and sorting for compilation"
120
120
  requiredSources = dependencies.required_source_files('TestRunner.f90')
121
121
 
122
- puts compile = "#{ENV['F9X']} #{ENV['F9X_LDFLAGS']} -o TestRunner \\\n #{requiredSources.join(" \\\n ")}"
122
+ puts compile = "#{ENV['FC']} #{ENV['FCFLAGS']} -o TestRunner \\\n #{requiredSources.join(" \\\n ")}"
123
123
 
124
124
  raise "Compile failed." unless system(compile)
125
125
  end
@@ -8,6 +8,11 @@
8
8
  # This file is governed by the NASA Open Source Agreement.
9
9
  # See COPYING for details.
10
10
  #++
11
+
12
+ require 'funit/assertions'
13
+ require 'funit/functions'
14
+ require 'ftools'
15
+
11
16
  module Funit
12
17
 
13
18
  include Funit::Assertions
@@ -19,9 +24,9 @@ module Funit
19
24
  def initialize suiteName
20
25
  @lineNumber = 'blank'
21
26
  @suiteName = suiteName
22
- return nil unless ftkExists?(suiteName)
23
- File.delete(suiteName+"MT.f90") if File.exists?(suiteName+"MT.f90")
24
- super(suiteName+"MT.f90","w")
27
+ return nil unless funit_exists?(suiteName)
28
+ File.delete(suiteName+".fun") if File.exists?(suiteName+"_fun.f90")
29
+ super(suiteName+"_fun.f90","w")
25
30
  @tests, @setup, @teardown = Array.new, Array.new, Array.new
26
31
  topWrapper
27
32
  expand
@@ -30,22 +35,22 @@ module Funit
30
35
 
31
36
  def topWrapper
32
37
  puts <<-TOP
33
- ! #{@suiteName}MT.f90 - a Fortran mobility test suite for #{@suiteName}.f90
38
+ ! #{@suiteName}_fun.f90 - a unit test suite for #{@suiteName}.f90
34
39
  !
35
- ! [dynamically generated from #{@suiteName}MT.ftk
36
- ! by #{File.basename $0} Ruby script #{Time.now}]
40
+ ! #{File.basename $0} generated this file from #{@suiteName}.fun
41
+ ! at #{Time.now}
37
42
 
38
- module #{@suiteName}MT
43
+ module #{@suiteName}_fun
39
44
 
40
45
  use #{@suiteName}
41
46
 
42
47
  implicit none
43
48
 
44
- private
49
+ logical :: noAssertFailed
45
50
 
46
- public :: MT#{@suiteName}
51
+ public :: test_#@suiteName
47
52
 
48
- logical :: noAssertFailed
53
+ private
49
54
 
50
55
  integer :: numTests = 0
51
56
  integer :: numAsserts = 0
@@ -57,32 +62,32 @@ module #{@suiteName}MT
57
62
 
58
63
  def expand
59
64
 
60
- ftkFile = @suiteName+"MT.ftk"
61
- $stderr.puts "parsing #{ftkFile}"
65
+ funit_file = @suiteName+".fun"
66
+ $stderr.print "expanding #{funit_file}..."
62
67
 
63
- ftk = IO.readlines(ftkFile)
64
- @ftkTotalLines = ftk.length
68
+ funit_contents = IO.readlines(funit_file)
69
+ @funit_TotalLines = funit_contents.length
65
70
 
66
- while (line = ftk.shift) && line !~ $keyword
71
+ while (line = funit_contents.shift) && line !~ $keyword
67
72
  puts line
68
73
  end
69
74
 
70
- ftk.unshift line
75
+ funit_contents.unshift line
71
76
 
72
77
  puts " contains\n\n"
73
78
 
74
- while (line = ftk.shift)
79
+ while (line = funit_contents.shift)
75
80
  case line
76
81
  when $commentLine
77
82
  puts line
78
83
  when /beginSetup/i
79
- addtoSetup ftk
84
+ addtoSetup funit_contents
80
85
  when /beginTeardown/i
81
- addtoTeardown ftk
86
+ addtoTeardown funit_contents
82
87
  when /XbeginTest\s+(\w+)/i
83
- ignoreTest($1,ftk)
88
+ ignoreTest($1,funit_contents)
84
89
  when /beginTest\s+(\w+)/i
85
- aTest($1,ftk)
90
+ aTest($1,funit_contents)
86
91
  when /beginTest/i
87
92
  syntaxError "no name given for beginTest", @suiteName
88
93
  when /end(Setup|Teardown|Test)/i
@@ -94,42 +99,42 @@ module #{@suiteName}MT
94
99
  end
95
100
  end # while
96
101
 
97
- $stderr.puts "completed #{ftkFile}"
102
+ $stderr.puts "done."
98
103
 
99
104
  end
100
105
 
101
- def addtoSetup ftk
102
- while (line = ftk.shift) && line !~ /endSetup/i
106
+ def addtoSetup funit_contents
107
+ while (line = funit_contents.shift) && line !~ /endSetup/i
103
108
  @setup.push line
104
109
  end
105
110
  end
106
111
 
107
- def addtoTeardown ftk
108
- while (line = ftk.shift) && line !~ /endTeardown/i
112
+ def addtoTeardown funit_contents
113
+ while (line = funit_contents.shift) && line !~ /endTeardown/i
109
114
  @teardown.push line
110
115
  end
111
116
  end
112
117
 
113
- def ignoreTest testName, ftk
118
+ def ignoreTest testName, funit_contents
114
119
  warning("Ignoring test: #{testName}", @suiteName)
115
- line = ftk.shift while line !~ /endTest/i
120
+ line = funit_contents.shift while line !~ /endTest/i
116
121
  end
117
122
 
118
- def aTest testName, ftk
123
+ def aTest testName, funit_contents
119
124
  @testName = testName
120
125
  @tests.push testName
121
126
  syntaxError("test name #@testName not unique",@suiteName) if (@tests.uniq!)
122
127
 
123
- puts " subroutine Test#{testName}\n\n"
128
+ puts " subroutine #{testName}\n\n"
124
129
 
125
130
  numOfAsserts = 0
126
131
 
127
- while (line = ftk.shift) && line !~ /endTest/i
132
+ while (line = funit_contents.shift) && line !~ /endTest/i
128
133
  case line
129
134
  when $commentLine
130
135
  puts line
131
136
  when /Is(RealEqual|False|True|EqualWithin|Equal)/i
132
- @lineNumber = @ftkTotalLines - ftk.length
137
+ @lineNumber = @funit_TotalLines - funit_contents.length
133
138
  numOfAsserts += 1
134
139
  puts send( $&.downcase!, line )
135
140
  else
@@ -139,7 +144,7 @@ module #{@suiteName}MT
139
144
  warning("no asserts in test", @suiteName) if numOfAsserts == 0
140
145
 
141
146
  puts "\n numTests = numTests + 1\n\n"
142
- puts " end subroutine Test#{testName}\n\n"
147
+ puts " end subroutine #{testName}\n\n"
143
148
  end
144
149
 
145
150
  def close
@@ -154,7 +159,7 @@ module #{@suiteName}MT
154
159
 
155
160
  puts <<-NEXTONE
156
161
 
157
- subroutine MT#{@suiteName}( nTests, nAsserts, nAssertsTested, nFailures )
162
+ subroutine test_#{@suiteName}( nTests, nAsserts, nAssertsTested, nFailures )
158
163
 
159
164
  integer :: nTests
160
165
  integer :: nAsserts
@@ -166,7 +171,7 @@ module #{@suiteName}MT
166
171
 
167
172
  @tests.each do |testName|
168
173
  puts "\n call Setup"
169
- puts " call Test#{testName}"
174
+ puts " call #{testName}"
170
175
  puts " call Teardown"
171
176
  end
172
177
 
@@ -177,12 +182,12 @@ module #{@suiteName}MT
177
182
  nAssertsTested = numAssertsTested
178
183
  nFailures = numFailures
179
184
 
180
- end subroutine MT#{@suiteName}
185
+ end subroutine test_#{@suiteName}
181
186
 
182
- end module #{@suiteName}MT
187
+ end module #{@suiteName}_fun
183
188
  LASTONE
184
189
  super
185
- File.chmod(0444,@suiteName+"MT.f90")
190
+ File.chmod(0444,@suiteName+"_fun.f90")
186
191
  end
187
192
 
188
193
  end # class TestSuite