fUnit 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/INSTALL +19 -0
- data/LICENSE +262 -0
- data/README +3 -0
- data/bin/funit +8 -0
- data/docs/HISTORY +20 -0
- data/docs/spiel/slides.tex +153 -0
- data/docs/why/F90testRun +43 -0
- data/docs/why/F90testRun.ps +548 -0
- data/docs/why/FluxFunctions.f90 +36 -0
- data/docs/why/FluxFunctions.f90.ps +526 -0
- data/docs/why/FluxFunctionsTS.f90 +324 -0
- data/docs/why/FluxFunctionsTS.f90.ps +1048 -0
- data/docs/why/FluxFunctionsTS.ftk +49 -0
- data/docs/why/FluxFunctionsTS.ftk.ps +554 -0
- data/docs/why/GasModel.f90 +19 -0
- data/docs/why/GasModel.f90.ps +496 -0
- data/docs/why/GasModelTS+SRC +44 -0
- data/docs/why/GasModelTS+SRC.ps +532 -0
- data/docs/why/GasModelTS.f90 +168 -0
- data/docs/why/GasModelTS.f90.ps +760 -0
- data/docs/why/GasModelTS.ftk +22 -0
- data/docs/why/GasModelTS.ftk.ps +507 -0
- data/docs/why/TestRunner.f90 +28 -0
- data/docs/why/TestRunner.f90.ps +511 -0
- data/docs/why/land2 +2 -0
- data/docs/why/landscape +2 -0
- data/docs/why/portrait +2 -0
- data/lib/clean +1 -0
- data/lib/fortran_deps.rb +109 -0
- data/lib/funit/assertions.rb +72 -0
- data/lib/funit/functions.rb +124 -0
- data/lib/funit/test_suite.rb +180 -0
- data/lib/funit.rb +25 -0
- data/lib/mklinks +5 -0
- data/tests/tc_compile.rb +30 -0
- data/tests/tc_fortran_deps.rb +167 -0
- data/tests/tc_funit.rb +104 -0
- data/tests/tc_test_suite.rb +82 -0
- data/tests/ts_funit.rb +6 -0
- metadata +85 -0
data/INSTALL
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Prerequisites
|
2
|
+
-------------
|
3
|
+
|
4
|
+
1) A Fortran 90/95/2003 compiler.
|
5
|
+
|
6
|
+
2) The Ruby language -- see http://www.ruby-lang.org/
|
7
|
+
|
8
|
+
3) RubyGems package manager -- see http://rubyforge.org/projects/rubygems/
|
9
|
+
|
10
|
+
|
11
|
+
Installation
|
12
|
+
------------
|
13
|
+
|
14
|
+
gem install funit
|
15
|
+
|
16
|
+
|
17
|
+
At some point, we plan to make installation easier by creating
|
18
|
+
a single executable with Erik Veenstra's RubyScript2Exe
|
19
|
+
<http://www.erikveen.dds.nl/rubyscript2exe/>.
|
data/LICENSE
ADDED
@@ -0,0 +1,262 @@
|
|
1
|
+
NASA OPEN SOURCE AGREEMENT VERSION 1.3
|
2
|
+
|
3
|
+
THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE,
|
4
|
+
REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN
|
5
|
+
COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT
|
6
|
+
AS REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT
|
7
|
+
AGENCY"). THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT
|
8
|
+
AGENCY, IS AN INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT
|
9
|
+
DISTRIBUTIONS OR REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO
|
10
|
+
USES, REPRODUCES, DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT
|
11
|
+
SOFTWARE, AS DEFINED HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION,
|
12
|
+
ACCEPTING IN FULL THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN
|
13
|
+
THIS AGREEMENT.
|
14
|
+
|
15
|
+
Government Agency: NASA Langley Research Center
|
16
|
+
Government Agency Original Software Designation: LAR-17081-1
|
17
|
+
Government Agency Original Software Title: fUnit
|
18
|
+
User Registration Requested: please see clause 3.F.
|
19
|
+
Government Agency Point of Contact: funit-support@rubyforge.org
|
20
|
+
|
21
|
+
1. DEFINITIONS
|
22
|
+
|
23
|
+
A. "Contributor" means Government Agency, as the developer of the
|
24
|
+
Original Software, and any entity that makes a Modification.
|
25
|
+
|
26
|
+
B. "Covered Patents" mean patent claims licensable by a Contributor
|
27
|
+
that are necessarily infringed by the use or sale of its Modification
|
28
|
+
alone or when combined with the Subject Software.
|
29
|
+
|
30
|
+
C. "Display" means the showing of a copy of the Subject Software,
|
31
|
+
either directly or by means of an image, or any other device.
|
32
|
+
|
33
|
+
D. "Distribution" means conveyance or transfer of the Subject
|
34
|
+
Software, regardless of means, to another.
|
35
|
+
|
36
|
+
E. "Larger Work" means computer software that combines Subject
|
37
|
+
Software, or portions thereof, with software separate from the Subject
|
38
|
+
Software that is not governed by the terms of this Agreement.
|
39
|
+
|
40
|
+
F. "Modification" means any alteration of, including addition to or
|
41
|
+
deletion from, the substance or structure of either the Original
|
42
|
+
Software or Subject Software, and includes derivative works, as that
|
43
|
+
term is defined in the Copyright Statute, 17 USC 101. However, the
|
44
|
+
act of including Subject Software as part of a Larger Work does not in
|
45
|
+
and of itself constitute a Modification.
|
46
|
+
|
47
|
+
G. "Original Software" means the computer software first released
|
48
|
+
under this Agreement by Government Agency with Government Agency
|
49
|
+
designation NASA and entitled fUnit, including source code,
|
50
|
+
object code and accompanying documentation, if any.
|
51
|
+
|
52
|
+
H. "Recipient" means anyone who acquires the Subject Software under
|
53
|
+
this Agreement, including all Contributors.
|
54
|
+
|
55
|
+
I. "Redistribution" means Distribution of the Subject Software after a
|
56
|
+
Modification has been made.
|
57
|
+
|
58
|
+
J. "Reproduction" means the making of a counterpart, image or copy of
|
59
|
+
the Subject Software.
|
60
|
+
|
61
|
+
K. "Sale" means the exchange of the Subject Software for money or
|
62
|
+
equivalent value.
|
63
|
+
|
64
|
+
L. "Subject Software" means the Original Software, Modifications, or
|
65
|
+
any respective parts thereof.
|
66
|
+
|
67
|
+
M. "Use" means the application or employment of the Subject Software
|
68
|
+
for any purpose.
|
69
|
+
|
70
|
+
2. GRANT OF RIGHTS
|
71
|
+
|
72
|
+
A. Under Non-Patent Rights: Subject to the terms and conditions of
|
73
|
+
this Agreement, each Contributor, with respect to its own contribution
|
74
|
+
to the Subject Software, hereby grants to each Recipient a
|
75
|
+
non-exclusive, world-wide, royalty-free license to engage in the
|
76
|
+
following activities pertaining to the Subject Software:
|
77
|
+
|
78
|
+
1. Use
|
79
|
+
2. Distribution
|
80
|
+
3. Reproduction
|
81
|
+
4. Modification
|
82
|
+
5. Redistribution
|
83
|
+
6. Display
|
84
|
+
|
85
|
+
B. Under Patent Rights: Subject to the terms and conditions of this
|
86
|
+
Agreement, each Contributor, with respect to its own contribution to
|
87
|
+
the Subject Software, hereby grants to each Recipient under Covered
|
88
|
+
Patents a non-exclusive, world-wide, royalty-free license to engage in
|
89
|
+
the following activities pertaining to the Subject Software:
|
90
|
+
|
91
|
+
1. Use
|
92
|
+
2. Distribution
|
93
|
+
3. Reproduction
|
94
|
+
4. Sale
|
95
|
+
5. Offer for Sale
|
96
|
+
|
97
|
+
C. The rights granted under Paragraph B. also apply to the combination
|
98
|
+
of a Contributor's Modification and the Subject Software if, at the
|
99
|
+
time the Modification is added by the Contributor, the addition of
|
100
|
+
such Modification causes the combination to be covered by the Covered
|
101
|
+
Patents. It does not apply to any other combinations that include a
|
102
|
+
Modification.
|
103
|
+
|
104
|
+
D. The rights granted in Paragraphs A. and B. allow the Recipient to
|
105
|
+
sublicense those same rights. Such sublicense must be under the same
|
106
|
+
terms and conditions of this Agreement.
|
107
|
+
|
108
|
+
3. OBLIGATIONS OF RECIPIENT
|
109
|
+
|
110
|
+
A. Distribution or Redistribution of the Subject Software must be made
|
111
|
+
under this Agreement except for additions covered under paragraph 3H.
|
112
|
+
|
113
|
+
1. Whenever a Recipient distributes or redistributes the Subject
|
114
|
+
Software, a copy of this Agreement must be included with each copy
|
115
|
+
of the Subject Software; and
|
116
|
+
|
117
|
+
2. If Recipient distributes or redistributes the Subject Software in
|
118
|
+
any form other than source code, Recipient must also make the
|
119
|
+
source code freely available, and must provide with each copy of
|
120
|
+
the Subject Software information on how to obtain the source code
|
121
|
+
in a reasonable manner on or through a medium customarily used for
|
122
|
+
software exchange.
|
123
|
+
|
124
|
+
B. Each Recipient must ensure that the following copyright notice
|
125
|
+
appears prominently in the Subject Software:
|
126
|
+
|
127
|
+
Copyright 2006 United States Government as represented by
|
128
|
+
NASA Langley Research Center. No copyright is claimed in
|
129
|
+
the United States under Title 17, U.S. Code. All Other Rights
|
130
|
+
Reserved.
|
131
|
+
|
132
|
+
C. Each Contributor must characterize its alteration of the Subject
|
133
|
+
Software as a Modification and must identify itself as the originator
|
134
|
+
of its Modification in a manner that reasonably allows subsequent
|
135
|
+
Recipients to identify the originator of the Modification. In
|
136
|
+
fulfillment of these requirements, Contributor must include a file
|
137
|
+
(e.g., a change log file) that describes the alterations made and the
|
138
|
+
date of the alterations, identifies Contributor as originator of the
|
139
|
+
alterations, and consents to characterization of the alterations as a
|
140
|
+
Modification, for example, by including a statement that the
|
141
|
+
Modification is derived, directly or indirectly, from Original
|
142
|
+
Software provided by Government Agency. Once consent is granted, it
|
143
|
+
may not thereafter be revoked.
|
144
|
+
|
145
|
+
D. A Contributor may add its own copyright notice to the Subject
|
146
|
+
Software. Once a copyright notice has been added to the Subject
|
147
|
+
Software, a Recipient may not remove it without the express permission
|
148
|
+
of the Contributor who added the notice.
|
149
|
+
|
150
|
+
E. A Recipient may not make any representation in the Subject Software
|
151
|
+
or in any promotional, advertising or other material that may be
|
152
|
+
construed as an endorsement by Government Agency or by any prior
|
153
|
+
Recipient of any product or service provided by Recipient, or that may
|
154
|
+
seek to obtain commercial advantage by the fact of Government Agency's
|
155
|
+
or a prior Recipient's participation in this Agreement.
|
156
|
+
|
157
|
+
F. In an effort to track usage and maintain accurate records of the
|
158
|
+
Subject Software, each Recipient, upon receipt of the Subject Software,
|
159
|
+
is requested to provide Government Agency, by e-mail to the Government
|
160
|
+
Agency Point of Contact listed in clause 5.F., the following information:
|
161
|
+
name, institution (if applicable), postal code, and country.
|
162
|
+
Recipient's name and personal information shall be used for statistical
|
163
|
+
purposes only. Once a Recipient makes a Modification available, it is
|
164
|
+
requested that the Recipient inform Government Agency, by e-mail to the
|
165
|
+
Government Agency Point of Contact listed in clause 5.F., how to
|
166
|
+
access the Modification.
|
167
|
+
|
168
|
+
G. Each Contributor represents that that its Modification is believed
|
169
|
+
to be Contributor's original creation and does not violate any
|
170
|
+
existing agreements, regulations, statutes or rules, and further that
|
171
|
+
Contributor has sufficient rights to grant the rights conveyed by this
|
172
|
+
Agreement.
|
173
|
+
|
174
|
+
H. A Recipient may choose to offer, and to charge a fee for, warranty,
|
175
|
+
support, indemnity and/or liability obligations to one or more other
|
176
|
+
Recipients of the Subject Software. A Recipient may do so, however,
|
177
|
+
only on its own behalf and not on behalf of Government Agency or any
|
178
|
+
other Recipient. Such a Recipient must make it absolutely clear that
|
179
|
+
any such warranty, support, indemnity and/or liability obligation is
|
180
|
+
offered by that Recipient alone. Further, such Recipient agrees to
|
181
|
+
indemnify Government Agency and every other Recipient for any
|
182
|
+
liability incurred by them as a result of warranty, support, indemnity
|
183
|
+
and/or liability offered by such Recipient.
|
184
|
+
|
185
|
+
I. A Recipient may create a Larger Work by combining Subject Software
|
186
|
+
with separate software not governed by the terms of this agreement and
|
187
|
+
distribute the Larger Work as a single product. In such case, the
|
188
|
+
Recipient must make sure Subject Software, or portions thereof,
|
189
|
+
included in the Larger Work is subject to this Agreement.
|
190
|
+
|
191
|
+
J. Notwithstanding any provisions contained herein, Recipient is
|
192
|
+
hereby put on notice that export of any goods or technical data from
|
193
|
+
the United States may require some form of export license from the
|
194
|
+
U.S. Government. Failure to obtain necessary export licenses may
|
195
|
+
result in criminal liability under U.S. laws. Government Agency
|
196
|
+
neither represents that a license shall not be required nor that, if
|
197
|
+
required, it shall be issued. Nothing granted herein provides any
|
198
|
+
such export license.
|
199
|
+
|
200
|
+
4. DISCLAIMER OF WARRANTIES AND LIABILITIES; WAIVER AND INDEMNIFICATION
|
201
|
+
|
202
|
+
A. No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY
|
203
|
+
WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY,
|
204
|
+
INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE
|
205
|
+
WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
|
206
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM
|
207
|
+
INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR
|
208
|
+
FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO
|
209
|
+
THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER,
|
210
|
+
CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT
|
211
|
+
OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY
|
212
|
+
OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE.
|
213
|
+
FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES
|
214
|
+
REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE,
|
215
|
+
AND DISTRIBUTES IT "AS IS."
|
216
|
+
|
217
|
+
B. Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS
|
218
|
+
AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND
|
219
|
+
SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF
|
220
|
+
THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES,
|
221
|
+
EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM
|
222
|
+
PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT
|
223
|
+
SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED
|
224
|
+
STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY
|
225
|
+
PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE
|
226
|
+
REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL
|
227
|
+
TERMINATION OF THIS AGREEMENT.
|
228
|
+
|
229
|
+
|
230
|
+
5. GENERAL TERMS
|
231
|
+
|
232
|
+
A. Termination: This Agreement and the rights granted hereunder will
|
233
|
+
terminate automatically if a Recipient fails to comply with these
|
234
|
+
terms and conditions, and fails to cure such noncompliance within
|
235
|
+
thirty (30) days of becoming aware of such noncompliance. Upon
|
236
|
+
termination, a Recipient agrees to immediately cease use and
|
237
|
+
distribution of the Subject Software. All sublicenses to the Subject
|
238
|
+
Software properly granted by the breaching Recipient shall survive any
|
239
|
+
such termination of this Agreement.
|
240
|
+
|
241
|
+
B. Severability: If any provision of this Agreement is invalid or
|
242
|
+
unenforceable under applicable law, it shall not affect the validity
|
243
|
+
or enforceability of the remainder of the terms of this Agreement.
|
244
|
+
|
245
|
+
C. Applicable Law: This Agreement shall be subject to United States
|
246
|
+
federal law only for all purposes, including, but not limited to,
|
247
|
+
determining the validity of this Agreement, the meaning of its
|
248
|
+
provisions and the rights, obligations and remedies of the parties.
|
249
|
+
|
250
|
+
D. Entire Understanding: This Agreement constitutes the entire
|
251
|
+
understanding and agreement of the parties relating to release of the
|
252
|
+
Subject Software and may not be superseded, modified or amended except
|
253
|
+
by further written agreement duly executed by the parties.
|
254
|
+
|
255
|
+
E. Binding Authority: By accepting and using the Subject Software
|
256
|
+
under this Agreement, a Recipient affirms its authority to bind the
|
257
|
+
Recipient to all terms and conditions of this Agreement and that that
|
258
|
+
Recipient hereby agrees to all terms and conditions herein.
|
259
|
+
|
260
|
+
F. Point of Contact: Any Recipient contact with Government Agency is
|
261
|
+
to be directed to the designated representative as follows:
|
262
|
+
funit-support@rubyforge.org.
|
data/README
ADDED
data/bin/funit
ADDED
data/docs/HISTORY
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
$Id: HISTORY 112 2006-04-05 11:23:45Z kleb $
|
2
|
+
|
3
|
+
A BRIEF HISTORY
|
4
|
+
|
5
|
+
On October 4, 2001, Mike Hill of Object Mentor, Inc. visited NASA
|
6
|
+
Langley Research Center in Hampton, Virginia and gave a test-first
|
7
|
+
design talk at Institute for Computer and Applied Sciences and
|
8
|
+
Engineering (ICASE).
|
9
|
+
|
10
|
+
Mike spent the afternoon with Bil Kleb, Bill Wood, Karen Bibb,
|
11
|
+
and Mike Park reasoning out how we might create a testing framework
|
12
|
+
for Fortran 90. By the end of the afternoon we had a working
|
13
|
+
protoype based on the macro expansion techniques employeed in
|
14
|
+
Mike's own cpptestkit.
|
15
|
+
|
16
|
+
The basic idea is that test routines should easily be written in
|
17
|
+
a psuedo-Fortran style (i.e., very lightweight), processed (via
|
18
|
+
the c preproccesor or a script) into valid Fortran90, collected, and
|
19
|
+
invoked by a dynamically-created/compiled/ linked/run Fortran90 code
|
20
|
+
named testrunner.
|
@@ -0,0 +1,153 @@
|
|
1
|
+
% $Id: slides.tex 112 2006-04-05 11:23:45Z kleb $
|
2
|
+
|
3
|
+
% Previewing and making Postscript version:
|
4
|
+
% latex slides
|
5
|
+
% xdvi -papertype usr slides
|
6
|
+
% dvips -t landscape -o slides.ps slides
|
7
|
+
% gv -seascape slides.ps [optional]
|
8
|
+
|
9
|
+
% Making and previewing a PDF version:
|
10
|
+
% pdflatex slides
|
11
|
+
% acroread slides.pdf
|
12
|
+
|
13
|
+
\documentclass[landscape]{slides}
|
14
|
+
\usepackage{url}
|
15
|
+
\pagestyle{empty}
|
16
|
+
\hoffset 1in
|
17
|
+
\begin{document}
|
18
|
+
\begin{slide}
|
19
|
+
\begin{center}
|
20
|
+
{\bf\Large F90 Testkit}\\
|
21
|
+
\vspace{0.5in}
|
22
|
+
\begin{minipage}{6.5in}
|
23
|
+
{\bf Goal:} to make Fortran~90 unit/\-mobility/\-developer testing
|
24
|
+
as painless as possible.
|
25
|
+
\end{minipage}
|
26
|
+
\end{center}
|
27
|
+
\end{slide}
|
28
|
+
\begin{slide}
|
29
|
+
\begin{center}
|
30
|
+
{\bf\Large Why write tests?}\\
|
31
|
+
\vspace{0.5in}
|
32
|
+
\begin{minipage}[t]{3in}
|
33
|
+
\begin{itemize}
|
34
|
+
\item Shame
|
35
|
+
\item Embarrassment
|
36
|
+
\item Speed
|
37
|
+
\item Confidence
|
38
|
+
\end{itemize}
|
39
|
+
\end{minipage}
|
40
|
+
\begin{minipage}[t]{3in}
|
41
|
+
\begin{itemize}
|
42
|
+
\item Trust
|
43
|
+
\item Change
|
44
|
+
\item Documentation
|
45
|
+
\end{itemize}
|
46
|
+
\end{minipage}
|
47
|
+
\end{center}
|
48
|
+
\end{slide}
|
49
|
+
\begin{slide}
|
50
|
+
\begin{center}
|
51
|
+
{\bf\Large Why write tests first?}\\
|
52
|
+
\vspace{0.5in}
|
53
|
+
\begin{minipage}{3in}
|
54
|
+
\begin{itemize}
|
55
|
+
\item Tests get written
|
56
|
+
\item Succinctness
|
57
|
+
\item Clarity
|
58
|
+
\item Closure
|
59
|
+
\end{itemize}
|
60
|
+
\end{minipage}\\
|
61
|
+
\vspace{1in}
|
62
|
+
\begin{minipage}{5.7in}\raggedright
|
63
|
+
``No code should be written or changed unless there is a failing
|
64
|
+
test.''
|
65
|
+
\end{minipage}
|
66
|
+
\end{center}
|
67
|
+
\end{slide}
|
68
|
+
\begin{slide}
|
69
|
+
\begin{center}
|
70
|
+
{\bf\Large How do I add tests to legacy code?}\\
|
71
|
+
\vspace{0.5in}
|
72
|
+
\begin{minipage}{6in}
|
73
|
+
\begin{itemize}
|
74
|
+
\item Fixing Bugs
|
75
|
+
\begin{itemize}
|
76
|
+
\item write test for bug {\small (which fails)}
|
77
|
+
\item write code to satisfy failing test
|
78
|
+
\item write tests/code for similar cases
|
79
|
+
\end{itemize}
|
80
|
+
\vspace{8pt}
|
81
|
+
\item Adding Features
|
82
|
+
\begin{itemize}
|
83
|
+
\item write test for feature {\small (which better fail)}
|
84
|
+
\item write code to satisfy failing test
|
85
|
+
\end{itemize}
|
86
|
+
\vspace{8pt}
|
87
|
+
\item Refactoring ``Bad Smells''
|
88
|
+
\begin{itemize}
|
89
|
+
\item write tests to cover existing code
|
90
|
+
\item update/add tests for new structure
|
91
|
+
\item change code to satisfy failing tests
|
92
|
+
\end{itemize}
|
93
|
+
\end{itemize}
|
94
|
+
\end{minipage}
|
95
|
+
\end{center}
|
96
|
+
\end{slide}
|
97
|
+
\begin{slide}
|
98
|
+
\begin{center}
|
99
|
+
{\bf\Large Crazy enough to learn more?}\\
|
100
|
+
\vspace{0.5in}
|
101
|
+
\begin{minipage}{6in}
|
102
|
+
\begin{itemize}
|
103
|
+
\item \url{http://c2.com/cgi/wiki?UnitTests}\\[-10pt]
|
104
|
+
\item \url{http://xprogramming.com/software.htm}
|
105
|
+
\end{itemize}
|
106
|
+
\end{minipage}
|
107
|
+
\end{center}
|
108
|
+
\end{slide}
|
109
|
+
\begin{slide}
|
110
|
+
\begin{center}
|
111
|
+
{\bf\Large Want to try F90 testkit?}\\
|
112
|
+
\vspace{0.5in}
|
113
|
+
\begin{minipage}{9in}
|
114
|
+
\begin{itemize}
|
115
|
+
\item Have your SA install Ruby {\small(or install it yourself)}\\[5pt]
|
116
|
+
\hspace*{1em}\url{http://www.ruby-lang.org/}\\[5pt]
|
117
|
+
\item Check out the FTK repository\\[5pt]
|
118
|
+
\hspace*{1em}\verb+cvs -d :pserver:[username]@abnode3:/usr/local/cvsroot \+\\
|
119
|
+
\hspace*{1em}\verb+checkout -P FTK+\\[5pt]
|
120
|
+
where \verb+[username]+ is your CVS username on \verb+abnode3+
|
121
|
+
\end{itemize}
|
122
|
+
\end{minipage}
|
123
|
+
\end{center}
|
124
|
+
\end{slide}
|
125
|
+
\begin{slide}
|
126
|
+
\begin{center}
|
127
|
+
{\bf\Large Who does what?}\\
|
128
|
+
\vspace{0.5in}
|
129
|
+
{\bf You:}
|
130
|
+
\begin{minipage}[t]{6.5in}\raggedright
|
131
|
+
\begin{enumerate}
|
132
|
+
\item Create testsuite file, e.g., \verb+RoutineTS.ftk+
|
133
|
+
\item Write test in Fortran with embedded assert macros, .e.g,
|
134
|
+
\verb+IsTrue(x>2)+
|
135
|
+
\item Run testsuite {\small (it should fail)}
|
136
|
+
\item Write \verb+Routine.f90+ to satisfy test
|
137
|
+
\end{enumerate}
|
138
|
+
\vspace{10pt}
|
139
|
+
Repeat steps 2, 3, and 4 until your objective is met.
|
140
|
+
\end{minipage}\\
|
141
|
+
\vspace{0.8in}
|
142
|
+
{\bf It:}
|
143
|
+
\begin{minipage}[t]{6in}\raggedright
|
144
|
+
Translates, compiles, links, and runs tests.
|
145
|
+
\end{minipage}
|
146
|
+
\end{center}
|
147
|
+
\end{slide}
|
148
|
+
\end{document}
|
149
|
+
|
150
|
+
%%% Local Variables:
|
151
|
+
%%% mode: latex
|
152
|
+
%%% TeX-master: t
|
153
|
+
%%% End:
|
data/docs/why/F90testRun
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
% F90test
|
2
|
+
|
3
|
+
parsing GasModelTS.ftk
|
4
|
+
parsing FluxFunctionsTS.ftk
|
5
|
+
|
6
|
+
*Warning: no asserts in test [GasModelTS.ftk:13]
|
7
|
+
completed GasModelTS.ftk
|
8
|
+
completed FluxFunctionsTS.ftk
|
9
|
+
|
10
|
+
|
11
|
+
Compiling file Gammas.f90.
|
12
|
+
Encountered 0 errors, 0 warnings in file Gammas.f90.
|
13
|
+
Compiling file GasModel.f90.
|
14
|
+
Encountered 0 errors, 0 warnings in file GasModel.f90.
|
15
|
+
Compiling file FluxFunctions.f90.
|
16
|
+
Encountered 0 errors, 0 warnings in file FluxFunctions.f90.
|
17
|
+
Compiling file GasModelTS.f90.
|
18
|
+
Encountered 0 errors, 0 warnings in file GasModelTS.f90.
|
19
|
+
Compiling file FluxFunctionsTS.f90.
|
20
|
+
Encountered 0 errors, 0 warnings in file FluxFunctionsTS.f90.
|
21
|
+
Compiling file TestRunner.f90.
|
22
|
+
Encountered 0 errors, 0 warnings in file TestRunner.f90.
|
23
|
+
Linking:
|
24
|
+
|
25
|
+
GasModel test suite:
|
26
|
+
Passed 5 of 5 possible asserts comprising 3 of 3 tests.
|
27
|
+
|
28
|
+
FluxFunctions test suite:
|
29
|
+
*IsFalse failed* in test RoeAvgZero [FluxFunctionsTS.ftk:23]
|
30
|
+
RoeAvg(0.0,0.0).ne.1 is not false
|
31
|
+
|
32
|
+
*IsTrue failed* in test RoeAvgKnown [FluxFunctionsTS.ftk:28]
|
33
|
+
RoeAvg(leftState,rightState).lt.0 is not true
|
34
|
+
|
35
|
+
*IsEqualWithin failed* in test CentralFluxKnown [FluxFunctionsTS.ftk:33]
|
36
|
+
interfaceFlux ( 0.250000000 ) is not 0.500000000 within 1.00000005E-03
|
37
|
+
|
38
|
+
*IsEqual failed* in test RoeFluxExpansionShock [FluxFunctionsTS.ftk:41]
|
39
|
+
interfaceFlux ( 0.500000000 ) is not 0
|
40
|
+
|
41
|
+
Passed 6 of 12 possible asserts comprising 3 of 7 tests.
|
42
|
+
|
43
|
+
%
|