funit 0.10.1 → 0.10.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/History.txt +7 -1
- data/README.txt +20 -18
- data/lib/funit.rb +1 -1
- metadata +3 -3
data/History.txt
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
=== 0.10.
|
1
|
+
=== 0.10.2 / 2008-03-30
|
2
|
+
|
3
|
+
* 2 bug fixes
|
4
|
+
* Updated README with proper syntax
|
5
|
+
* Corrected prior release history copy and version number
|
6
|
+
|
7
|
+
=== 0.10.1 / 2008-03-30
|
2
8
|
|
3
9
|
* 1 major enhancement
|
4
10
|
* Non-passing tests exit with non-zero exit code
|
data/README.txt
CHANGED
@@ -14,6 +14,7 @@ runs them against the code under test.
|
|
14
14
|
|
15
15
|
FUnit is {opinionated software}[http://www.oreillynet.com/pub/a/network/2005/08/30/ruby-rails-david-heinemeier-hansson.html], which values convention over
|
16
16
|
configuration. Specifically, FUnit,
|
17
|
+
|
17
18
|
* requires a Fortran 95 compiler,
|
18
19
|
* only supports testing routines contained in modules,
|
19
20
|
* requires tests to be stored along side the code under test, and
|
@@ -40,12 +41,16 @@ viscosity as a function of temperature, e.g.,
|
|
40
41
|
end module
|
41
42
|
|
42
43
|
Tests of this module would be contained in <tt>gas_physics.fun</tt>,
|
43
|
-
|
44
|
+
and might contain a test like,
|
45
|
+
|
46
|
+
test_suite gas_physics
|
47
|
+
|
48
|
+
test viscosity_varies_as_temperature
|
49
|
+
assert_real_equal( 0.0, viscosity(0.0) )
|
50
|
+
assert_equal_within( 0.7071, viscosity(50.0), 1e-3 )
|
51
|
+
end test
|
44
52
|
|
45
|
-
|
46
|
-
IsRealEqual( 0.0, viscosity(0.0) )
|
47
|
-
IsEqualWithin( 0.7071, viscosity(50.0), 1e-3 )
|
48
|
-
endTest
|
53
|
+
end test_suite
|
49
54
|
|
50
55
|
This brief fragment is all you need. The framework provides the rest
|
51
56
|
of the trappings to turn this into valid Fortran code.
|
@@ -58,16 +63,14 @@ which would transform your fragments contained in <tt>gas_physics.fun</tt>
|
|
58
63
|
into valid Fortran code, create a test runner program, compile everything,
|
59
64
|
and run the tests, viz,
|
60
65
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
g95
|
65
|
-
|
66
|
-
gas_physics_fun.f90 \
|
67
|
-
TestRunner.f90
|
66
|
+
expanding test suite: gas_physics... done.
|
67
|
+
locating associated source files and sorting for compilation
|
68
|
+
(cd .; g95 -c gas_physics_fun.f90)
|
69
|
+
(cd .; g95 -c TestRunner.f90)
|
70
|
+
g95 -o TestRunner gas_physics.o gas_physics_fun.o TestRunner.o
|
68
71
|
|
69
|
-
|
70
|
-
|
72
|
+
gas_physics test suite:
|
73
|
+
Passed 2 of 2 possible asserts comprising 1 of 1 tests.
|
71
74
|
|
72
75
|
This and other examples come with the FUnit distribution in the
|
73
76
|
<tt>examples</tt> directory. There is also an emacs mode in
|
@@ -77,8 +80,8 @@ these directories can be found in your Rubygems library directory, e.g., <tt>/us
|
|
77
80
|
== REQUIREMENTS:
|
78
81
|
|
79
82
|
* Fortran 90/95/2003 compiler
|
80
|
-
* Ruby with Rubygems
|
81
|
-
* fortran
|
83
|
+
* Ruby with Rubygems package manager
|
84
|
+
* The fortran Rubygem
|
82
85
|
|
83
86
|
== INSTALL:
|
84
87
|
|
@@ -109,10 +112,9 @@ rewrote the framework in Ruby[http://www.ruby-lang.org].
|
|
109
112
|
|
110
113
|
== TODO:
|
111
114
|
|
112
|
-
* Add --version option.
|
113
115
|
* To avoid Fortran's 32-character limit, don't add test name during translation.
|
114
116
|
* Add assertions that capture stops, warning messages, and other exits.
|
115
|
-
* For compilation, use internal rake task instead of
|
117
|
+
* For compilation, use internal rake task instead of an external makefile.
|
116
118
|
* Allow users to specify dependency search paths (currently hardwired).
|
117
119
|
* To increase portability, create stand-alone executables with Erik Veenstra's
|
118
120
|
RubyScript2Exe[http://www.erikveen.dds.nl/rubyscript2exe/].
|
data/lib/funit.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: funit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karen Bibb
|
@@ -13,7 +13,7 @@ autorequire:
|
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
|
16
|
-
date: 2008-
|
16
|
+
date: 2008-04-01 00:00:00 -04:00
|
17
17
|
default_executable:
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: 1.5.1
|
36
36
|
version:
|
37
|
-
description: FUnit is a unit testing framework for Fortran. Unit tests are written as Fortran fragments that use a small set of testing-specific keywords and functions. FUnit transforms these fragments into valid Fortran code, compiles, links, and runs them against the code under test. FUnit is {opinionated software}[http://www.oreillynet.com/pub/a/network/2005/08/30/ruby-rails-david-heinemeier-hansson.html], which values convention over configuration. Specifically, FUnit,
|
37
|
+
description: FUnit is a unit testing framework for Fortran. Unit tests are written as Fortran fragments that use a small set of testing-specific keywords and functions. FUnit transforms these fragments into valid Fortran code, compiles, links, and runs them against the code under test. FUnit is {opinionated software}[http://www.oreillynet.com/pub/a/network/2005/08/30/ruby-rails-david-heinemeier-hansson.html], which values convention over configuration. Specifically, FUnit, * requires a Fortran 95 compiler, * only supports testing routines contained in modules, * requires tests to be stored along side the code under test, and * requires test files to be named appropriately.
|
38
38
|
email: nasarb-developers@rubyforge.org
|
39
39
|
executables:
|
40
40
|
- funit
|