fUnit 0.1.1 → 0.1.2

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.
data/README CHANGED
@@ -128,3 +128,4 @@ rewrote the framework in Ruby[http:www.ruby-lang.org].
128
128
  * To increase portability, create a single, stand-alone executable with
129
129
  Erik Veenstra's RubyScript2Exe[http://www.erikveen.dds.nl/rubyscript2exe/].
130
130
  * Use a makefile instead of a single, ordered command line for compilation.
131
+ * Add some command line options and usage.
data/Rakefile CHANGED
@@ -20,7 +20,7 @@ require 'rake/testtask'
20
20
  require 'rake/rdoctask'
21
21
  require 'rake/clean'
22
22
 
23
- PKG_VERSION = '0.1.1'
23
+ PKG_VERSION = '0.1.2'
24
24
 
25
25
  PKG_FILES = FileList[
26
26
  '[A-Z]*',
@@ -286,7 +286,6 @@
286
286
 
287
287
  <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;\nnTests = numTests\nnAsserts = numAsserts\nnAssertsTested = numAssertsTested\nnFailures = numFailures\n\nend subroutine test_\#{@suiteName}\n\nend module \#{@suiteName}_fun\n&quot;</span>
288
288
  <span class="ruby-keyword kw">super</span>
289
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span>(<span class="ruby-value">0444</span>,<span class="ruby-ivar">@suiteName</span><span class="ruby-operator">+</span><span class="ruby-value str">&quot;_fun.f90&quot;</span>)
290
289
  <span class="ruby-keyword kw">end</span>
291
290
  </pre>
292
291
  </div>
@@ -161,7 +161,7 @@ Class <a href="Funit/TestSuite.html" class="link">Funit::TestSuite</a><br />
161
161
  onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
162
162
  <div class="method-source-code" id="M000009-source">
163
163
  <pre>
164
- <span class="ruby-comment cmt"># File lib/funit/functions.rb, line 121</span>
164
+ <span class="ruby-comment cmt"># File lib/funit/functions.rb, line 120</span>
165
165
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compileTests</span> <span class="ruby-identifier">testSuites</span>
166
166
  <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;computing dependencies&quot;</span>
167
167
  <span class="ruby-identifier">dependencies</span> = <span class="ruby-constant">Depend</span>.<span class="ruby-identifier">new</span>([<span class="ruby-value str">'.'</span>, <span class="ruby-value str">'../LibF90'</span>, <span class="ruby-value str">'../PHYSICS_DEPS'</span>])
@@ -307,7 +307,7 @@ Class <a href="Funit/TestSuite.html" class="link">Funit::TestSuite</a><br />
307
307
  onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
308
308
  <div class="method-source-code" id="M000007-source">
309
309
  <pre>
310
- <span class="ruby-comment cmt"># File lib/funit/functions.rb, line 113</span>
310
+ <span class="ruby-comment cmt"># File lib/funit/functions.rb, line 112</span>
311
311
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">syntaxError</span>( <span class="ruby-identifier">message</span>, <span class="ruby-identifier">testSuite</span> )
312
312
  <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;\n *Error: #{message} [#{testSuite}.fun:#$.]\n\n&quot;</span>
313
313
  <span class="ruby-keyword kw">end</span>
@@ -330,7 +330,7 @@ Class <a href="Funit/TestSuite.html" class="link">Funit::TestSuite</a><br />
330
330
  onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
331
331
  <div class="method-source-code" id="M000008-source">
332
332
  <pre>
333
- <span class="ruby-comment cmt"># File lib/funit/functions.rb, line 117</span>
333
+ <span class="ruby-comment cmt"># File lib/funit/functions.rb, line 116</span>
334
334
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">warning</span>( <span class="ruby-identifier">message</span>, <span class="ruby-identifier">testSuite</span> )
335
335
  <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\n *Warning: #{message} [#{testSuite}.fun:#$.]&quot;</span>
336
336
  <span class="ruby-keyword kw">end</span>
@@ -372,7 +372,6 @@ Class <a href="Funit/TestSuite.html" class="link">Funit::TestSuite</a><br />
372
372
  <span class="ruby-identifier">testRunner</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;\n print *, \&quot;\&quot;&quot;</span>
373
373
  <span class="ruby-identifier">testRunner</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;\nend program TestRunner&quot;</span>
374
374
  <span class="ruby-identifier">testRunner</span>.<span class="ruby-identifier">close</span>
375
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span>(<span class="ruby-value">0444</span>,<span class="ruby-value str">&quot;TestRunner.f90&quot;</span>)
376
375
  <span class="ruby-keyword kw">end</span>
377
376
  </pre>
378
377
  </div>
@@ -1 +1 @@
1
- Tue Apr 18 07:35:14 EDT 2006
1
+ Tue Apr 18 09:40:12 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>Sun Apr 16 07:29:30 EDT 2006</td>
59
+ <td>Tue Apr 18 09:40:02 EDT 2006</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -234,6 +234,9 @@ href="http://www.erikveen.dds.nl/rubyscript2exe/">RubyScript2Exe</a>.
234
234
  </li>
235
235
  <li>Use a makefile instead of a single, ordered command line for compilation.
236
236
 
237
+ </li>
238
+ <li>Add some command line options and usage.
239
+
237
240
  </li>
238
241
  </ul>
239
242
 
@@ -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 16:13:09 EDT 2006</td>
59
+ <td>Tue Apr 18 08:25:03 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>Sat Apr 15 16:53:46 EDT 2006</td>
59
+ <td>Tue Apr 18 08:25:16 EDT 2006</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -1,4 +1,4 @@
1
- ! $Id: FluxFunctions.fun 150 2006-04-15 21:07:25Z kleb $
1
+ ! $Id: FluxFunctions.fun 166 2006-04-18 13:34:25Z kleb $
2
2
 
3
3
  real :: leftState, rightState, interfaceFlux
4
4
 
@@ -10,40 +10,40 @@ endsetup
10
10
  beginTest FluxZero
11
11
  real :: state
12
12
  state = 0
13
- IsEqualWithin( Flux(state), 0, 0.00001 )
13
+ IsEqualWithin( 0, Flux(state), 0.00001 )
14
14
  endTest
15
15
 
16
16
  beginTest FluxOne
17
17
  real :: state = 1
18
- IsEqualWithin( Flux(state), 0.5, 0.00001 )
18
+ IsEqualWithin( 0.5, Flux(state), 0.00001 )
19
19
  endTest
20
20
 
21
21
  beginTest RoeAvgZero
22
- IsRealEqual( RoeAvg(0.0,0.0), 0 )
23
- IsFalse( RoeAvg(0.0,0.0).ne.1 )
22
+ IsRealEqual( 0, RoeAvg(0.0,0.0) )
23
+ IsFalse( RoeAvg(0.0,0.0)==1 )
24
24
  endTest
25
25
 
26
26
  beginTest RoeAvgKnown
27
- IsRealEqual( RoeAvg(leftState,rightState), 0.5 )
28
- IsTrue( RoeAvg(leftState,rightState).lt.0 )
27
+ IsRealEqual( 0.5, RoeAvg(leftState,rightState) )
28
+ IsTrue( RoeAvg(leftState,rightState) > 0 )
29
29
  endTest
30
30
 
31
31
  beginTest CentralFluxKnown
32
32
  call CentralFlux( leftState, rightState, interfaceFlux )
33
- IsEqualWithin( interfaceFlux, 0.5, 0.001 )
34
- IsEqualWithin( interfaceFlux, 0.5, 0.00000001 )
35
- IsEqual( interfaceFlux, 0.5 )
33
+ IsEqualWithin( 0.25, interfaceFlux, 0.001 )
34
+ IsEqualWithin( 0.25, interfaceFlux, 0.00000001 )
35
+ IsEqual( 0.25, interfaceFlux )
36
36
  endTest
37
37
 
38
38
  beginTest RoeFluxExpansionShock
39
39
  leftState = -1
40
40
  call RoeFlux( leftState, rightState, interfaceFlux )
41
- IsEqual( interfaceFlux, 0 )
41
+ IsEqual( 0.5, interfaceFlux )
42
42
  endTest
43
43
 
44
44
  beginTest RoeFluxZero
45
45
  rightState = 0
46
46
  call RoeFlux( leftState, rightState, interfaceFlux )
47
- IsRealEqual( interfaceFlux, 0 )
48
- IsEqual( interfaceFlux, 0 )
47
+ IsRealEqual( 0, interfaceFlux )
48
+ IsEqual( 0, interfaceFlux )
49
49
  endTest
@@ -1,12 +1,12 @@
1
- ! $Id: GasModel.fun 150 2006-04-15 21:07:25Z kleb $
1
+ ! $Id: GasModel.fun 166 2006-04-18 13:34:25Z kleb $
2
2
 
3
- real :: Pressure, Density, Energy
3
+ real :: Pressure, Density, Energy
4
4
 
5
5
  beginTest PerfectPZeroed
6
6
  real, parameter :: zero = 0
7
7
  call PerfectP (zero, zero, Pressure)
8
- isRealEqual (Pressure, 0 )
9
- IsEqualwithin ( Pressure, 0, 0.0000000001 )
8
+ isRealEqual ( 0, Pressure )
9
+ IsEqualwithin ( 0, Pressure, 0.0000000001 )
10
10
  endTest
11
11
 
12
12
  begintest Warbler
@@ -16,7 +16,7 @@ beginTest PerfectPKnown
16
16
  real :: Density = 1
17
17
  Energy = 1
18
18
  call PerfectP( Density, Energy, Pressure )
19
- IsRealEqual( Pressure, 0.4 )
20
- IsTrue ( Pressure .gt. 0 )
21
- IsFalse( Pressure .lt. 0 )
19
+ IsRealEqual( 0.4, Pressure )
20
+ IsTrue ( Pressure > 0 )
21
+ IsFalse( Pressure < 0 )
22
22
  endTest
@@ -18,14 +18,14 @@ beginTest OneMSecDifference
18
18
  dateAndTime1 = (/ 2000, 1, 1, 0, 0, 0, 0, 0 /)
19
19
  dateAndTime2 = (/ 2000, 1, 1, 0, 0, 0, 0, 1 /)
20
20
  seconds = SecBetween(dateAndTime1, dateAndTime2)
21
- IsRealEqual(seconds, 0.001)
21
+ IsRealEqual( 0.001, seconds)
22
22
  endTest
23
23
 
24
24
  beginTest MinuteRollover
25
25
  dateAndTime1 = (/ 2000, 1, 1, 0, 0, 0,59, 0 /)
26
26
  dateAndTime2 = (/ 2000, 1, 1, 0, 0, 1, 0, 0 /)
27
27
  seconds = SecBetween(dateAndTime1, dateAndTime2)
28
- IsRealEqual(seconds, 1.0)
28
+ IsRealEqual( 1.0, seconds )
29
29
  endTest
30
30
 
31
31
  ! test secSinceLast
@@ -39,7 +39,7 @@ endTest
39
39
 
40
40
  beginTest InitiallyReturnsZero
41
41
  seconds = secSinceLast()
42
- IsRealEqual(seconds, 0.0)
42
+ IsRealEqual( 0.0, seconds )
43
43
  call timeDelay(seconds)
44
44
  seconds = secSinceLast()
45
45
  IsTrue( seconds /= 0.0 )
@@ -69,5 +69,5 @@ beginTest ComputesSecondsSpecial
69
69
  seconds = secSinceLast()
70
70
  dateAndTime2 = last
71
71
  expectedSeconds = secBetween(dateAndTime1,dateAndTime2)
72
- IsRealEqual(seconds, expectedSeconds)
72
+ IsRealEqual( expectedSeconds, seconds )
73
73
  endTest
@@ -102,7 +102,6 @@ program TestRunner
102
102
  testRunner.puts "\n print *, \"\""
103
103
  testRunner.puts "\nend program TestRunner"
104
104
  testRunner.close
105
- File.chmod(0444,"TestRunner.f90")
106
105
  end
107
106
 
108
107
  def syntaxError( message, testSuite )
@@ -187,7 +187,6 @@ module #{@suiteName}_fun
187
187
  end module #{@suiteName}_fun
188
188
  LASTONE
189
189
  super
190
- File.chmod(0444,@suiteName+"_fun.f90")
191
190
  end
192
191
 
193
192
  end # class TestSuite
@@ -68,7 +68,7 @@ class TestTestSuite < Test::Unit::TestCase
68
68
  beginTest assertTrue
69
69
  integer :: a(2,2)
70
70
  a = 1
71
- IsEqual(a(1,1),1)
71
+ IsEqual(1,a(1,1))
72
72
  endTest
73
73
  MATRIX
74
74
  Funit::TestSuite.new 'dummyf90test'
@@ -80,7 +80,7 @@ class TestTestSuite < Test::Unit::TestCase
80
80
  beginTest assert_equals
81
81
  real :: real_var
82
82
  real_var = 1.0
83
- IsRealEqual(real_var,1.0)
83
+ IsRealEqual(1.0,real_var)
84
84
  endTest
85
85
  REALEQUALS
86
86
  Funit::TestSuite.new 'dummyf90test'
@@ -90,7 +90,7 @@ class TestTestSuite < Test::Unit::TestCase
90
90
  def test_real_equals_assert_works_with_function
91
91
  create_funit_file <<-REQUALSFUNC
92
92
  beginTest assert_equals_for_function
93
- IsRealEqual(balance(0.0,0.0),0.0)
93
+ IsRealEqual(0.0,balance(0.0,0.0))
94
94
  endTest
95
95
  function balance( left, right)
96
96
  real :: balance
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: fUnit
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
6
+ version: 0.1.2
7
7
  date: 2006-04-18 00:00:00 -04:00
8
8
  summary: A Fortran Unit Testing Framework
9
9
  require_paths: