release version
This commit is contained in:
commit
d1d604fc2e
6
AUTHORS
Normal file
6
AUTHORS
Normal file
@ -0,0 +1,6 @@
|
||||
Michael Feathers <mfeathers@objectmentor.com>
|
||||
Jerome Lacoste <lacostej@altern.org>
|
||||
E. Sommerlade <eric@sommerla.de>
|
||||
Baptiste Lepilleur <gaiacrtn@free.fr> <blep@sourceforge.net>
|
||||
Bastiaan Bakker <bastiaan.bakker@lifeline.nl>
|
||||
Steve Robbins <smr99@sourceforge.net>
|
6
BUGS
Normal file
6
BUGS
Normal file
@ -0,0 +1,6 @@
|
||||
KNOWN BUGS
|
||||
----------
|
||||
|
||||
The handling of html and man pages in doc/Makefile.am is
|
||||
flawed. It will not pass "make distcheck".
|
||||
|
504
COPYING
Normal file
504
COPYING
Normal file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
61
CodingGuideLines.txt
Normal file
61
CodingGuideLines.txt
Normal file
@ -0,0 +1,61 @@
|
||||
CppUnit's coding guidelines for portability:
|
||||
--------------------------------------------
|
||||
|
||||
- don't explicitly declare CppUnit namespace, instead use macro
|
||||
CPPUNIT_NS_BEGIN and CPPUNIT_NS_END.
|
||||
|
||||
- don't explicitly use 'CppUnit' to refer to class in CppUnit namespace,
|
||||
instead use macro CPPUNIT_NS which expands to either 'CppUnit' or
|
||||
nothing depending on the configuration.
|
||||
|
||||
- don't use the 'using directive', always use full qualification. For STL,
|
||||
always use std::.
|
||||
|
||||
- don't use C++ style cast directly, instead use CppUnit's cast macro
|
||||
(CPPUNIT_CONST_CAST).
|
||||
|
||||
- don't use the mutable keyword, instead do a const cast.
|
||||
|
||||
- don't use the typename keyword in template declaration, instead use 'class'.
|
||||
|
||||
- don't make use of RTTI (typeid) or dynamic_cast mandatory.
|
||||
|
||||
- don't use STL container directly, instead use CppUnit's wrapper located
|
||||
in include/cppunit/portability. This help support compilers that don't
|
||||
support default template parameter and require an allocator to be
|
||||
specified.
|
||||
|
||||
- don't use default template parameters. If needed, use STLPort wrapper
|
||||
technic (see include/cppunit/portability/).
|
||||
|
||||
- don't use templatized member functions (template method declared inside a
|
||||
class), instead declares them as simple template functions (even
|
||||
mainstream compiler such as VC++ 6 as trouble with them).
|
||||
|
||||
- don't use default parameter value in template function. Not supported
|
||||
by all compiler (on OS/390 for instance).
|
||||
|
||||
- don't use STL container at() method, instead use the array accessor [].
|
||||
at() is not supported on some gcc versions.
|
||||
|
||||
- dereferencing containers must be done by (*ref_ptr).data instead of
|
||||
ref_ptr->data.
|
||||
|
||||
In brief, it should be possible to compile CppUnit on a C++ compiler that do
|
||||
not have the following features:
|
||||
- C++ style cast
|
||||
- mutable and typename keyword
|
||||
- RTTI
|
||||
- template default parameters
|
||||
- templatized member functions (that is a template function declared within a
|
||||
class).
|
||||
- namespace
|
||||
|
||||
As such, usage of those features should always be optional.
|
||||
|
||||
Following those guidelines should allow to compile on most compilers, as long
|
||||
as STL are available (in std namespace or not), with some form of strstream and
|
||||
iostream, as well as exception support.
|
||||
|
||||
--
|
||||
Baptiste Lepilleur <gaiacrtn@free.fr>
|
226
INSTALL
Normal file
226
INSTALL
Normal file
@ -0,0 +1,226 @@
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for variables by setting
|
||||
them in the environment. You can do that on the command line like this:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Environment Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the host type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the host
|
||||
platform (i.e., that on which the generated programs will eventually be
|
||||
run) with `--host=TYPE'. In this case, you should also specify the
|
||||
build platform with `--build=TYPE', because, in this case, it may not
|
||||
be possible to guess the build platform (it sometimes involves
|
||||
compiling and running simple test programs, and this can't be done if
|
||||
the compiler is a cross compiler).
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Environment Variables
|
||||
=====================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to configure. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
205
INSTALL-WIN32.txt
Normal file
205
INSTALL-WIN32.txt
Normal file
@ -0,0 +1,205 @@
|
||||
Frequently Asked Questions: See doc/FAQ
|
||||
|
||||
|
||||
At the current time, the only supported WIN32 platform is
|
||||
Microsoft Visual C++. You must have VC++ 6.0 at least.
|
||||
|
||||
Quick Steps to compile & run a sample using the GUI TestRunner:
|
||||
- Open examples/examples.dsw in VC++ (contains all the samples).
|
||||
VC7 will ask you if you want to convert, anwser 'yes to all'.
|
||||
- Make HostApp the Active project
|
||||
- Compile
|
||||
- For Visual Studio 6 only:
|
||||
- in VC++, Tools/Customize.../Add-ins and macro files/Browse...
|
||||
- select the file lib/TestRunnerDSPlugIn.dll and press ok to register
|
||||
the add-ins (double-click on failure = open file in VC++).
|
||||
- Run the project
|
||||
|
||||
|
||||
Project build Target:
|
||||
---------------------
|
||||
|
||||
Framework & tools:
|
||||
|
||||
* cppunit (cppunit.lib) : unit testing framework library, the one you use
|
||||
to write unit tests.
|
||||
|
||||
* cppunit_dll(cppunit_dll.dll/lib) : same as above, but build as a DLL.
|
||||
|
||||
* DllPlugInTester(DllPlugInTester.exe) : test plug-in runner executable.
|
||||
Use this to test DLL in your post-build step, or debug them.
|
||||
|
||||
* TestRunner (testrunner.dll) : a MFC extension DLL to run and browser unit
|
||||
tests from a GUI.
|
||||
|
||||
* DSPlugIn (lib/TestRunnerDSPlugIn.dll) : a VC++ 6.0 add-in used by
|
||||
testrunner.dll. If you double-click on a failure in the MFC TestRunner,
|
||||
a running instance of VC++ will open the file and highlight the line.
|
||||
This add-ins is not required for Visual Studio 7.
|
||||
|
||||
* TestPlugInRunner : (Warning: experimental) a VC++
|
||||
application to run test plug-in. A test plug-in is a DLL that publish a
|
||||
specified interface. This application is still incomplete (the auto-reload
|
||||
feature is missing).
|
||||
|
||||
All libraries are placed in the lib/ directory.
|
||||
|
||||
|
||||
Examples:
|
||||
---------
|
||||
|
||||
* CppUnitTestMain : the actual test suite use to test CppUnit. Use a
|
||||
TextTestRunner, and post-build testing with CompilterOutputter. Configuration
|
||||
to link against cppunit static library and cppunit dll library.
|
||||
|
||||
* CppUnitTestApp : contains the same test suite as CppUnitTestMain, but
|
||||
run them using the MFC TestRunner.
|
||||
|
||||
* hierarchy : a sample demonstrating how to sublcass test (you might rather
|
||||
want to use HelperMacros.h and the CPPUNIT_TEST_SUB_SUITE macro which does
|
||||
it in a 'cleaner' way. That sample has not been updated for a long time).
|
||||
|
||||
* HostApp : a sample using the MFC TestRunner demonstrating different test
|
||||
failure. Also demonstrates the MFC Unicode TestRunner.
|
||||
|
||||
* Money : an example that come along with the Money article of the
|
||||
documentation. Probably what you want to look at if you are a newbie.
|
||||
|
||||
|
||||
Configuration:
|
||||
--------------
|
||||
|
||||
CppUnit and TestRunner comes with 3 configurations.
|
||||
|
||||
* Release (): Multihtreaded DLL, release mode
|
||||
* Debug (d): Debug Multithreaded DLL, debug mode
|
||||
* Unicode Release (u): Unicode Multihtreaded DLL, release mode
|
||||
* Unicode Debug (ud): Unicode Debug Multithreaded DLL, debug mode
|
||||
|
||||
For CppUnit, when building as dll, "dll" is appended to the 'suffix'.
|
||||
|
||||
The letters enclosed in brackets indicates the suffix added to
|
||||
the library name. For example, the debug configuration cppunit static library
|
||||
name is cppunitd.lib. The debug configuration cppunit dll name is cppunitd_dll.lib.
|
||||
|
||||
|
||||
Building:
|
||||
---------
|
||||
|
||||
* Open the src/CppUnitLibraries.dsw workspace in VC++.
|
||||
* In the 'Build' menu, select 'Batch Build...'
|
||||
* In the batch build dialog, select all projects and press the build button.
|
||||
* The resulting libraries can be found in the lib/ directory.
|
||||
|
||||
|
||||
Testing:
|
||||
--------
|
||||
|
||||
* Open the workspace examples/Examples.dsw.
|
||||
* Make CppUnitTestApp the active project.
|
||||
* Select the configuration you build the library for.
|
||||
* Compile and run the project. The TestRunner GUI should appear.
|
||||
|
||||
|
||||
Libraries:
|
||||
----------
|
||||
|
||||
All the compiled libraries and DLL can be found in the 'lib' directory.
|
||||
Most libraries can be build from src/CppUnitLibraries.dsw workspace.
|
||||
|
||||
lib\:
|
||||
cppunit.lib : CppUnit static library "Multithreaded DLL"
|
||||
cppunitd.lib : CppUnit static library "Debug Multithreaded DLL"
|
||||
cppunit_dll.dll : CppUnit dynamic library (DLL) "Multithreaded DLL"
|
||||
cppunit_dll.lib : CppUnit dynamic import library "Multithreaded DLL"
|
||||
cppunitd_dll.dll : CppUnit dynamic library (DLL) "Debug Multithreaded DLL"
|
||||
cppunitd_dll.lib : CppUnit dynamic import library "Debug Multithreaded DLL"
|
||||
qttestrunner.dll : QT TestRunner dynamic library (DLL) "Multithreaded DLL"
|
||||
qttestrunner.lib : QT TestRunner import library "Multithreaded DLL"
|
||||
testrunner.dll : MFC TestRunner dynamic library (DLL) "Multithreaded DLL"
|
||||
testrunner.lib : MFC TestRunner import library "Multithreaded DLL"
|
||||
testrunnerd.dll : MFC TestRunner dynamic library (DLL) "Debug Multithreaded DLL"
|
||||
testrunnerd.lib : MFC TestRunner import library "Debug Multithreaded DLL"
|
||||
testrunneru.dll : MFC Unicode TestRunner dynamic library (DLL) "Multithreaded DLL"
|
||||
testrunneru.lib : MFC Unicode TestRunner import library "Multithreaded DLL"
|
||||
testrunnerud.dll : MFC Unicode TestRunner dynamic library (DLL) "Debug Multithreaded DLL"
|
||||
testrunnerud.lib : MFC Unicode TestRunner import library "Debug Multithreaded DLL"
|
||||
TestRunnerDSPlugIn.dll : The add-in you register in VC++.
|
||||
|
||||
Notes that when you are using CppUnit DLL (cppunit*_dll.dll), you must link
|
||||
against the associated import library and define the pre-processor symbol
|
||||
CPPUNIT_DLL in your project.
|
||||
|
||||
|
||||
Tools:
|
||||
------
|
||||
|
||||
CppUnit provides a generic test runner for test plug-in: DllPlugInTester.
|
||||
It can be found in the lib/ directory. It requires cppunit*_dll.dll
|
||||
|
||||
lib/:
|
||||
DllPlugInTester_dll.exe : test plug-in runner, "Multithreaded DLL", cppunit_dll.dll
|
||||
DllPlugInTesterd_dll.exe : test plug-in runner, "Debug Multithreaded DLL", cppunitd_dll.dll
|
||||
DllPlugInTester.exe : test plug-in runner, "Multithreaded DLL", static link cppunit.lib
|
||||
DllPlugInTesterd.exe : test plug-in runner, "Debug Multithreaded DLL", static link cppunitd.lib
|
||||
|
||||
Notes that the DllPlugInTester(d).exe version of this tools does not allow
|
||||
to use the automatic test registration that comes along with test plug-in.
|
||||
You probably don't want to use them unless you really know what you are doing.
|
||||
|
||||
|
||||
Using CppUnit:
|
||||
--------------
|
||||
|
||||
* Writing unit tests:
|
||||
To write unit tests, you need to link against cppunitXX.lib, where
|
||||
XX is the chosen configuration suffix letters.
|
||||
CppUnit include directory must be in the include search path.
|
||||
You can do that by adding the include directory in
|
||||
Project Settings/C++/Preprocessor/Additional include directories,
|
||||
or Tools/Options/Directories/Include.
|
||||
|
||||
Quick steps:
|
||||
- link lib/cppunitXX.lib
|
||||
- include/ must be in the include search path
|
||||
|
||||
* Using the TestRunner GUI:
|
||||
To use the test runner GUI you need to link against testrunnerXX.lib
|
||||
and cppunitXX.lib, where XX is the chosen configuration suffix
|
||||
letters. testrunner.dll must be in the path when your program is
|
||||
run (the Debug/Release directory, your project dsp directory, or
|
||||
in a directory specified in the PATH environment variable).
|
||||
One of the easiest way to do that is to either add a post-build
|
||||
command or add the testrunner.dll which is in the lib/ directory
|
||||
to your project and define a custom build step that copy the
|
||||
dll to your "Intermediate" directory (Debug or Release usually).
|
||||
|
||||
Since the TestRunner GUI is a MFC extension DLL, it can access
|
||||
the CWinApp of the using application. Settings are stored using
|
||||
the application registry key. That means that "most recently used
|
||||
test" settings are different for each application.
|
||||
|
||||
Quick steps:
|
||||
- link lib/cppunitXX.lib and lib/testrunnerXX.lib
|
||||
- include/ must be in the include search path
|
||||
- lib/testrunnerXX.dll must be available to run your project
|
||||
|
||||
* Using the DSPlugIn:
|
||||
You must register the plug-in with VC++. This is done in
|
||||
Tools/Customize/Add-ins and Macro files, selecting browse and
|
||||
selecting lib/TestRunnerDSPlugIn.dll (you can register the release
|
||||
or the debug version, both work).
|
||||
|
||||
If an instance of VC++ is running and you double-click on a failure,
|
||||
VC++ will open the file and select the failure line.
|
||||
|
||||
* Using the Test Plug In Runner:
|
||||
Your DLL must export a function that implement the interface
|
||||
defined in include/msvc6/testrunner/TestPlugInInterface.h.
|
||||
See examples/msvc6/TestPlugIn/TestPlugInInterfaceImpl.* for an example.
|
||||
Be warned, that runner is still experimental and have not been tested
|
||||
much.
|
||||
|
||||
If you did a batch build, run TestPlugInRunnerd.exe and choose dll
|
||||
examples/cppunittest/DebugPlugIn/CppUnitTestPlugInd.dll, or
|
||||
examples/simple/DebugPlugIn/simple_plugind.dll to test it out.
|
121
INSTALL-unix
Normal file
121
INSTALL-unix
Normal file
@ -0,0 +1,121 @@
|
||||
See the file INSTALL for basic instructions. A short explanation for
|
||||
each non-standard configure option follows.
|
||||
|
||||
--disable-typeinfo-name
|
||||
|
||||
Some output from the library will use a class name to distinguish
|
||||
between tests. Normally, the Run-Time Type Information (RTTI) system
|
||||
is used (specifically, the type_info::name() function) to generate the
|
||||
name. Some compilers return human-readable names via this interface.
|
||||
Other compilers do not.
|
||||
|
||||
If your compiler does not generate a pleasing class name, specify
|
||||
this option; the names will be generated by other means. The names
|
||||
are used only for diagnostic purposes -- no functionality will be
|
||||
lost nor gained by using this option.
|
||||
|
||||
|
||||
|
||||
System Notes
|
||||
------------
|
||||
|
||||
cygwin
|
||||
------
|
||||
|
||||
We have a number of reports that the shared library fails to
|
||||
build properly. This may manifest itself as a failure to
|
||||
build and run the test suite ("make check").
|
||||
|
||||
The workaround is to build a static library only. Configure using
|
||||
|
||||
./configure --disable-shared
|
||||
|
||||
Then build normally.
|
||||
|
||||
|
||||
|
||||
DEC alpha with cxx V6.1-029 and RogueWave STL
|
||||
---------------------------------------------
|
||||
|
||||
A user reports that you have to issue the command
|
||||
|
||||
export DEC_CXX="-D__USE_STD_IOSTREAM -D__STD_MS"
|
||||
|
||||
in order to get ostream defined in namespace std. Otherwise, the
|
||||
build reports the following error.
|
||||
|
||||
Cannot define CppUnit::OStringStream
|
||||
|
||||
|
||||
|
||||
If the compiler complains about 'exception', it may help to
|
||||
re-run configure with
|
||||
|
||||
CPPFLAGS='-U_OSF_SOURCE'
|
||||
|
||||
on the configure line. Please let us know about your experiences
|
||||
with this platform so that we can keep this information up-to-date.
|
||||
|
||||
|
||||
|
||||
IRIX 6 / MIPSpro compiler
|
||||
-------------------------
|
||||
|
||||
The MIPSpro compiler requires the "-LANG:std" flag to enable the
|
||||
standard C++ library. You must set the CC variable when you configure,
|
||||
as follows
|
||||
./configure CC='CC -LANG:std'
|
||||
|
||||
There is a bug in released versions of libtool prevents the -LANG flag
|
||||
from being properly passed during the linking stage. To check if you
|
||||
have this bug, examine the output of "grep 'no.*irix' libtool". If
|
||||
you see a line like "no/*-*-irix*)" then you suffer from the bug. [A
|
||||
fixed version of libtool will look like "no/*-*-irix* | /*-*-irix*)".]
|
||||
|
||||
If your libtool script suffers from the bug, open it in an editor,
|
||||
find the first line that contains "with_gcc", and change it to
|
||||
read "with_gcc=no".
|
||||
|
||||
The MIPSpro version 7.30 is able to compile cppunit proper, but will
|
||||
fail to compile the example testsuite. I am assuming this is due
|
||||
to known bugs in the compiler (7.30 is not the latest version).
|
||||
The library appears to function OK. Please let us know if you find
|
||||
it otherwise.
|
||||
|
||||
|
||||
Solaris/Sun CC compiler
|
||||
-----------------------
|
||||
|
||||
Use the following configure line:
|
||||
|
||||
./configure CXX=CC CXXFLAGS="-pta -instances=static -mt
|
||||
-xtarget=generic -g -features=no%transitions
|
||||
-xildoff" LD=CC LDFLAGS=-xildoff
|
||||
|
||||
In Forte C++ compiler for Solaris all the linking has to go via
|
||||
CC and ar, ld should not be run directly. For archive use CC -xar and
|
||||
for linking and generating the .so use CC -G
|
||||
|
||||
Notes: CC 5.5 don't need that much flag to compile correctly. Though, I'm not
|
||||
sure what are the required one.
|
||||
|
||||
|
||||
AIX
|
||||
---
|
||||
|
||||
./configure --disable-shared
|
||||
|
||||
The autogen tools don't seem to generate correctly script to handle dynamic linking.
|
||||
If anyone know how to get it working, please contact us.
|
||||
|
||||
|
||||
HP-UX
|
||||
-----
|
||||
Use the following options with configure to
|
||||
enable the use of aCC and cc for the compilation of
|
||||
CppUnit:
|
||||
./configure --enable-hpuxshl CC=cc CXX=aCC CXXFLAGS="-AA"
|
||||
|
||||
AA sets all the necessary flags to enable namespaces,
|
||||
stl v2,....
|
||||
|
80
Makefile.am
Normal file
80
Makefile.am
Normal file
@ -0,0 +1,80 @@
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
ACLOCAL_AMFLAGS = -I config
|
||||
|
||||
SUBDIRS = src include examples doc
|
||||
|
||||
pkgconfigdatadir = $(libdir)/pkgconfig
|
||||
|
||||
pkgconfigdata_DATA = cppunit.pc
|
||||
|
||||
bin_SCRIPTS = cppunit-config
|
||||
man_MANS = cppunit-config.1
|
||||
|
||||
|
||||
EXTRA_DIST = BUGS INSTALL-unix INSTALL-WIN32.txt CodingGuideLines.txt \
|
||||
cppunit-config.1 \
|
||||
cppunit.m4 cppunit.spec.in cppunit.spec \
|
||||
$(m4sources) \
|
||||
contrib/msvc/CppUnit.WWTpl \
|
||||
contrib/msvc/readme.txt \
|
||||
contrib/msvc/AddingUnitTestMethod.dsm \
|
||||
contrib/bc5/bcc-makefile.zip \
|
||||
contrib/xml-xsl/tests.xml \
|
||||
contrib/xml-xsl/report.xsl \
|
||||
src/CppUnitLibraries.dsw \
|
||||
lib/.keepme
|
||||
|
||||
m4sources = \
|
||||
config/ac_create_prefix_config_h.m4 \
|
||||
config/ac_cxx_have_sstream.m4 \
|
||||
config/ac_cxx_have_strstream.m4 \
|
||||
config/ax_cxx_gcc_abi_demangle.m4 \
|
||||
config/ac_cxx_namespaces.m4 \
|
||||
config/ac_cxx_rtti.m4 \
|
||||
config/ac_cxx_string_compare_string_first.m4 \
|
||||
config/bb_enable_doxygen.m4 \
|
||||
config/ac_dll.m4
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = cppunit.m4
|
||||
|
||||
# Not sure what is creating the timestamp file.
|
||||
# The so_locations file only happens on IRIX.
|
||||
DISTCLEANFILES = config/stamp-h1 so_locations
|
||||
|
||||
dist-hook:
|
||||
cp -dpR $(top_srcdir)/src/msvc6 $(distdir)/src
|
||||
cp -dpR $(top_srcdir)/src/qttestrunner $(distdir)/src
|
||||
cp -dpR $(top_srcdir)/include/msvc6 $(distdir)/include
|
||||
cp -dpR $(top_srcdir)/examples/msvc6 $(distdir)/examples
|
||||
cp -dpR $(top_srcdir)/examples/qt $(distdir)/examples
|
||||
test -d $(distdir)/lib || mkdir $(distdir)/lib
|
||||
find $(distdir) -name CVS | xargs rm -rf
|
||||
perl -pi -e 's/\n/\r\n/g' `find $(distdir) -name '*.ds?'` \
|
||||
$(distdir)/contrib/msvc/* \
|
||||
$(distdir)/INSTALL-WIN32.txt
|
||||
|
||||
.PHONY: release snapshot rpm docs doc-dist
|
||||
|
||||
release:
|
||||
rm -rf .deps */.deps
|
||||
$(MAKE) distcheck
|
||||
|
||||
snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)-`date +%Y-%m-%d`
|
||||
|
||||
rpm: dist
|
||||
rpm -ta $(PACKAGE)-$(VERSION).tar.gz
|
||||
mv -f /usr/src/redhat/SRPMS/$(PACKAGE)-$(VERSION)-*.rpm .
|
||||
mv -f /usr/src/redhat/RPMS/*/$(PACKAGE)-$(VERSION)-*.rpm .
|
||||
mv -f /usr/src/redhat/RPMS/*/$(PACKAGE)-doc-$(VERSION)-*.rpm .
|
||||
|
||||
debian:
|
||||
chmod a+x debian/rules
|
||||
dpkg-buildpackage -rfakeroot -sa -us -uc -tc
|
||||
|
||||
doc-dist:
|
||||
$(MAKE) -C doc doc-dist
|
||||
mv -f doc/$(PACKAGE)-docs-$(VERSION).tar.gz .
|
||||
|
||||
|
872
Makefile.in
Normal file
872
Makefile.in
Normal file
@ -0,0 +1,872 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/cppunit-config.in \
|
||||
$(srcdir)/cppunit.pc.in $(srcdir)/cppunit.spec.in \
|
||||
$(top_srcdir)/config/config.h.in $(top_srcdir)/configure \
|
||||
AUTHORS COPYING ChangeLog INSTALL NEWS THANKS TODO \
|
||||
config/config.guess config/config.sub config/depcomp \
|
||||
config/install-sh config/ltmain.sh config/missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/ac_create_prefix_config_h.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_sstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_strstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_namespaces.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_rtti.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_string_compare_string_first.m4 \
|
||||
$(top_srcdir)/config/ac_dll.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_gcc_abi_demangle.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_have_isfinite.m4 \
|
||||
$(top_srcdir)/config/bb_enable_doxygen.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES = cppunit.pc cppunit.spec cppunit-config
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
|
||||
"$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdatadir)"
|
||||
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
man1dir = $(mandir)/man1
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
m4dataDATA_INSTALL = $(INSTALL_DATA)
|
||||
pkgconfigdataDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(m4data_DATA) $(pkgconfigdata_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPPUNIT_BINARY_AGE = @CPPUNIT_BINARY_AGE@
|
||||
CPPUNIT_INTERFACE_AGE = @CPPUNIT_INTERFACE_AGE@
|
||||
CPPUNIT_MAJOR_VERSION = @CPPUNIT_MAJOR_VERSION@
|
||||
CPPUNIT_MICRO_VERSION = @CPPUNIT_MICRO_VERSION@
|
||||
CPPUNIT_MINOR_VERSION = @CPPUNIT_MINOR_VERSION@
|
||||
CPPUNIT_VERSION = @CPPUNIT_VERSION@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOT = @DOT@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
enable_dot = @enable_dot@
|
||||
enable_html_docs = @enable_html_docs@
|
||||
enable_latex_docs = @enable_latex_docs@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
ACLOCAL_AMFLAGS = -I config
|
||||
SUBDIRS = src include examples doc
|
||||
pkgconfigdatadir = $(libdir)/pkgconfig
|
||||
pkgconfigdata_DATA = cppunit.pc
|
||||
bin_SCRIPTS = cppunit-config
|
||||
man_MANS = cppunit-config.1
|
||||
EXTRA_DIST = BUGS INSTALL-unix INSTALL-WIN32.txt CodingGuideLines.txt \
|
||||
cppunit-config.1 \
|
||||
cppunit.m4 cppunit.spec.in cppunit.spec \
|
||||
$(m4sources) \
|
||||
contrib/msvc/CppUnit.WWTpl \
|
||||
contrib/msvc/readme.txt \
|
||||
contrib/msvc/AddingUnitTestMethod.dsm \
|
||||
contrib/bc5/bcc-makefile.zip \
|
||||
contrib/xml-xsl/tests.xml \
|
||||
contrib/xml-xsl/report.xsl \
|
||||
src/CppUnitLibraries.dsw \
|
||||
lib/.keepme
|
||||
|
||||
m4sources = \
|
||||
config/ac_create_prefix_config_h.m4 \
|
||||
config/ac_cxx_have_sstream.m4 \
|
||||
config/ac_cxx_have_strstream.m4 \
|
||||
config/ax_cxx_gcc_abi_demangle.m4 \
|
||||
config/ac_cxx_namespaces.m4 \
|
||||
config/ac_cxx_rtti.m4 \
|
||||
config/ac_cxx_string_compare_string_first.m4 \
|
||||
config/bb_enable_doxygen.m4 \
|
||||
config/ac_dll.m4
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = cppunit.m4
|
||||
|
||||
# Not sure what is creating the timestamp file.
|
||||
# The so_locations file only happens on IRIX.
|
||||
DISTCLEANFILES = config/stamp-h1 so_locations
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config/config.h: config/stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f config/stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) config/stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
config/stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status
|
||||
@rm -f config/stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config/config.h
|
||||
$(top_srcdir)/config/config.h.in: $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f config/stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config/config.h config/stamp-h1
|
||||
cppunit.pc: $(top_builddir)/config.status $(srcdir)/cppunit.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
cppunit.spec: $(top_builddir)/config.status $(srcdir)/cppunit.spec.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
cppunit-config: $(top_builddir)/config.status $(srcdir)/cppunit-config.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
install-man1: $(man1_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
install-m4dataDATA: $(m4data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
|
||||
@list='$(m4data_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(m4dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4datadir)/$$f'"; \
|
||||
$(m4dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4datadir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-m4dataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(m4data_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(m4datadir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(m4datadir)/$$f"; \
|
||||
done
|
||||
install-pkgconfigdataDATA: $(pkgconfigdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgconfigdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdatadir)"
|
||||
@list='$(pkgconfigdata_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(pkgconfigdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdatadir)/$$f'"; \
|
||||
$(pkgconfigdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdatadir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigdataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfigdata_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pkgconfigdatadir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgconfigdatadir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdatadir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-m4dataDATA install-man \
|
||||
install-pkgconfigdataDATA
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-exec-am: install-binSCRIPTS
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-m4dataDATA uninstall-man \
|
||||
uninstall-pkgconfigdataDATA
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-zip \
|
||||
distcheck distclean distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-binSCRIPTS install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-m4dataDATA install-man install-man1 \
|
||||
install-pdf install-pdf-am install-pkgconfigdataDATA \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-binSCRIPTS \
|
||||
uninstall-m4dataDATA uninstall-man uninstall-man1 \
|
||||
uninstall-pkgconfigdataDATA
|
||||
|
||||
|
||||
dist-hook:
|
||||
cp -dpR $(top_srcdir)/src/msvc6 $(distdir)/src
|
||||
cp -dpR $(top_srcdir)/src/qttestrunner $(distdir)/src
|
||||
cp -dpR $(top_srcdir)/include/msvc6 $(distdir)/include
|
||||
cp -dpR $(top_srcdir)/examples/msvc6 $(distdir)/examples
|
||||
cp -dpR $(top_srcdir)/examples/qt $(distdir)/examples
|
||||
test -d $(distdir)/lib || mkdir $(distdir)/lib
|
||||
find $(distdir) -name CVS | xargs rm -rf
|
||||
perl -pi -e 's/\n/\r\n/g' `find $(distdir) -name '*.ds?'` \
|
||||
$(distdir)/contrib/msvc/* \
|
||||
$(distdir)/INSTALL-WIN32.txt
|
||||
|
||||
.PHONY: release snapshot rpm docs doc-dist
|
||||
|
||||
release:
|
||||
rm -rf .deps */.deps
|
||||
$(MAKE) distcheck
|
||||
|
||||
snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)-`date +%Y-%m-%d`
|
||||
|
||||
rpm: dist
|
||||
rpm -ta $(PACKAGE)-$(VERSION).tar.gz
|
||||
mv -f /usr/src/redhat/SRPMS/$(PACKAGE)-$(VERSION)-*.rpm .
|
||||
mv -f /usr/src/redhat/RPMS/*/$(PACKAGE)-$(VERSION)-*.rpm .
|
||||
mv -f /usr/src/redhat/RPMS/*/$(PACKAGE)-doc-$(VERSION)-*.rpm .
|
||||
|
||||
debian:
|
||||
chmod a+x debian/rules
|
||||
dpkg-buildpackage -rfakeroot -sa -us -uc -tc
|
||||
|
||||
doc-dist:
|
||||
$(MAKE) -C doc doc-dist
|
||||
mv -f doc/$(PACKAGE)-docs-$(VERSION).tar.gz .
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
19
README
Normal file
19
README
Normal file
@ -0,0 +1,19 @@
|
||||
CppUnit --- The C++ Unit Test Library
|
||||
-------------------------------------
|
||||
http://cppunit.sourceforge.net
|
||||
|
||||
|
||||
CppUnit is the C++ port of the famous JUnit framework for unit
|
||||
testing.
|
||||
|
||||
For MSWindows installation notes, see INSTALL-WIN32.txt.
|
||||
For other systems -- including cygwin -- see INSTALL and INSTALL-unix.
|
||||
|
||||
|
||||
Bug reports are welcome. Please use the SourceForge bug tracking
|
||||
system at http://sourceforge.net/projects/cppunit/. Bugs that already
|
||||
appear in the file BUGS do not need to be reported.
|
||||
|
||||
Email to the current maintainers may be sent to
|
||||
<cppunit-devel@lists.sourceforge.net>.
|
||||
|
23
THANKS
Normal file
23
THANKS
Normal file
@ -0,0 +1,23 @@
|
||||
Tim Jansen <timj@systembureau.com>
|
||||
Christian Leutloff <leutloff@debian.org>
|
||||
Steve M. Robbins <smr@sumost.ca>
|
||||
Patrick Berny <PPBerny@web.de>
|
||||
Patrick Hartling
|
||||
Peer Sommerlund
|
||||
Duane Murphy <duanem@users.sourceforge.net>
|
||||
Gigi Sayfan <gigi@morphink.com>
|
||||
Armin "bored" Michel <bored@sourceforge.net>
|
||||
Jeffrey Morgan <kuzman@zoominternet.net>
|
||||
'cuppa' project team (http://sourceforge.jp/projects/cuppa/)
|
||||
Phil Verghese <philv@users.sourceforge.net>
|
||||
Lavoie Philippe <lavoie@yukon.genie.uottawa.ca>
|
||||
Pavel Zabelin
|
||||
Marco Welti <Welti@GretagMacbeth.ch>
|
||||
Thomas Neidhart
|
||||
Hans Bühler <hans.buehler@topmail.de> (Dynamic Window library used by MFC UI)
|
||||
John Sisson
|
||||
Steven Mitter <smitter@iicm.tu-graz.ac.at>
|
||||
Stephan Stapel <stephan.stapel@web.de>
|
||||
Abdessattar Sassi <abdesassi@users.sourceforge.net> (hp-ux plug-in support)
|
||||
Max Quatember and Andreas Pfaffenbichler (VC++ 7 MFC TestRunner go to source line)
|
||||
Vincent Rivière
|
35
TODO
Normal file
35
TODO
Normal file
@ -0,0 +1,35 @@
|
||||
* Bugs:
|
||||
Asserter::makeNotEqualMessage() strip the shortDescription of the additional message.
|
||||
|
||||
* CppUnit:
|
||||
- STL concept checker.
|
||||
- Memory leak tracking: setUp/tearDown should be leak safe if no failure occured.
|
||||
|
||||
* UnitTest
|
||||
- add tests for XmlOutputter::setStyleSheet (current assertion macro strip <?...> when
|
||||
testing )
|
||||
|
||||
* VC++ TestRunner:
|
||||
- Modify MfcUi::TestRunner to expose TestResult (which allow specific TestListener
|
||||
for global initialization).
|
||||
- Update MfcTestRunner to use TestPath to store test in the registry
|
||||
|
||||
* Documentation:
|
||||
CookBook:
|
||||
- how to create simple test cases (with CppUnit namespace)
|
||||
- test case using only CPPUINT_ASSERT
|
||||
- test case using CPPUNIT_ASSERT_EQUAL
|
||||
- advanced assertions with the CPPUNIT_ASSERT_MESSAGE
|
||||
- Helper Macros for convenience
|
||||
- Creating a suite
|
||||
- Composing a suite from more suites (i.e. compose tests for n modules to
|
||||
form a big test for the whole program)
|
||||
- customizing output using an user defined TestListener
|
||||
- how to write the TestListener (subclass of TestListener)
|
||||
- how to hook it in
|
||||
- how to use the GUI
|
||||
- MSVC++ special stuff
|
||||
- other custmization stuff I haven't understood yet
|
||||
|
||||
CppUnit: architecture overview.
|
||||
|
7542
aclocal.m4
vendored
Normal file
7542
aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
107
config/ac_create_prefix_config_h.m4
Normal file
107
config/ac_create_prefix_config_h.m4
Normal file
@ -0,0 +1,107 @@
|
||||
dnl @synopsis AC_CREATE_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]
|
||||
dnl
|
||||
dnl this is a new variant from ac_prefix_config_
|
||||
dnl this one will use a lowercase-prefix if
|
||||
dnl the config-define was starting with a lowercase-char, e.g.
|
||||
dnl #define const or #define restrict or #define off_t
|
||||
dnl (and this one can live in another directory, e.g. testpkg/config.h
|
||||
dnl therefore I decided to move the output-header to be the first arg)
|
||||
dnl
|
||||
dnl takes the usual config.h generated header file; looks for each of
|
||||
dnl the generated "#define SOMEDEF" lines, and prefixes the defined name
|
||||
dnl (ie. makes it "#define PREFIX_SOMEDEF". The result is written to
|
||||
dnl the output config.header file. The PREFIX is converted to uppercase
|
||||
dnl for the conversions.
|
||||
dnl
|
||||
dnl default OUTPUT-HEADER = $PACKAGE-config.h
|
||||
dnl default PREFIX = $PACKAGE
|
||||
dnl default ORIG-HEADER, derived from OUTPUT-HEADER
|
||||
dnl if OUTPUT-HEADER has a "/", use the basename
|
||||
dnl if OUTPUT-HEADER has a "-", use the section after it.
|
||||
dnl otherwise, just config.h
|
||||
dnl
|
||||
dnl In most cases, the configure.in will contain a line saying
|
||||
dnl AC_CONFIG_HEADER(config.h)
|
||||
dnl somewhere *before* AC_OUTPUT and a simple line saying
|
||||
dnl AC_PREFIX_CONFIG_HEADER
|
||||
dnl somewhere *after* AC_OUTPUT.
|
||||
dnl
|
||||
dnl example:
|
||||
dnl AC_INIT(config.h.in) # config.h.in as created by "autoheader"
|
||||
dnl AM_INIT_AUTOMAKE(testpkg, 0.1.1) # "#undef VERSION" and "PACKAGE"
|
||||
dnl AM_CONFIG_HEADER(config.h) # in config.h.in
|
||||
dnl AC_MEMORY_H # "#undef NEED_MEMORY_H"
|
||||
dnl AC_C_CONST_H # "#undef const"
|
||||
dnl AC_OUTPUT(Makefile) # creates the "config.h" now
|
||||
dnl AC_CREATE_PREFIX_CONFIG_H # creates "testpkg-config.h"
|
||||
dnl and the resulting "testpkg-config.h" contains lines like
|
||||
dnl #ifndef TESTPKG_VERSION
|
||||
dnl #define TESTPKG_VERSION "0.1.1"
|
||||
dnl #endif
|
||||
dnl #ifndef TESTPKG_NEED_MEMORY_H
|
||||
dnl #define TESTPKG_NEED_MEMORY_H 1
|
||||
dnl #endif
|
||||
dnl #ifndef _testpkg_const
|
||||
dnl #define _testpkg_const const
|
||||
dnl #endif
|
||||
dnl
|
||||
dnl and this "testpkg-config.h" can be installed along with other
|
||||
dnl header-files, which is most convenient when creating a shared
|
||||
dnl library (that has some headers) where some functionality is
|
||||
dnl dependent on the OS-features detected at compile-time. No
|
||||
dnl need to invent some "testpkg-confdefs.h.in" manually. :-)
|
||||
dnl
|
||||
dnl @version $Id: ac_create_prefix_config_h.m4,v 1.1 2001/06/17 15:47:32 bastiaan Exp $
|
||||
dnl @author Guido Draheim <guidod@gmx.de>
|
||||
|
||||
AC_DEFUN([AC_CREATE_PREFIX_CONFIG_H],
|
||||
[changequote({, })dnl
|
||||
ac_prefix_conf_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
|
||||
ac_prefix_conf_DEF=`echo _$ac_prefix_conf_OUT | sed -e 'y:abcdefghijklmnopqrstuvwxyz./,-:ABCDEFGHIJKLMNOPQRSTUVWXYZ____:'`
|
||||
ac_prefix_conf_PKG=`echo ifelse($2, , $PACKAGE, $2)`
|
||||
ac_prefix_conf_LOW=`echo _$ac_prefix_conf_PKG | sed -e 'y:ABCDEFGHIJKLMNOPQRSTUVWXYZ-:abcdefghijklmnopqrstuvwxyz_:'`
|
||||
ac_prefix_conf_UPP=`echo $ac_prefix_conf_PKG | sed -e 'y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:' -e '/^[0-9]/s/^/_/'`
|
||||
ac_prefix_conf_INP=`echo ifelse($3, , _, $3)`
|
||||
if test "$ac_prefix_conf_INP" = "_"; then
|
||||
case $ac_prefix_conf_OUT in
|
||||
*/*) ac_prefix_conf_INP=`basename $ac_prefix_conf_OUT`
|
||||
;;
|
||||
*-*) ac_prefix_conf_INP=`echo $ac_prefix_conf_OUT | sed -e 's/[a-zA-Z0-9_]*-//'`
|
||||
;;
|
||||
*) ac_prefix_conf_INP=config.h
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
changequote([, ])dnl
|
||||
if test -z "$ac_prefix_conf_PKG" ; then
|
||||
AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
|
||||
else
|
||||
AC_MSG_RESULT(creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines)
|
||||
if test -f $ac_prefix_conf_INP ; then
|
||||
AS_DIRNAME([/* automatically generated */], $ac_prefix_conf_OUT)
|
||||
changequote({, })dnl
|
||||
echo '#ifndef '$ac_prefix_conf_DEF >$ac_prefix_conf_OUT
|
||||
echo '#define '$ac_prefix_conf_DEF' 1' >>$ac_prefix_conf_OUT
|
||||
echo ' ' >>$ac_prefix_conf_OUT
|
||||
echo /'*' $ac_prefix_conf_OUT. Generated automatically at end of configure. '*'/ >>$ac_prefix_conf_OUT
|
||||
|
||||
echo 's/#undef *\([A-Z_]\)/#undef '$ac_prefix_conf_UPP'_\1/' >conftest.sed
|
||||
echo 's/#undef *\([a-z]\)/#undef '$ac_prefix_conf_LOW'_\1/' >>conftest.sed
|
||||
echo 's/#define *\([A-Z_][A-Za-z0-9_]*\)\(.*\)/#ifndef '$ac_prefix_conf_UPP"_\\1 \\" >>conftest.sed
|
||||
echo '#define '$ac_prefix_conf_UPP"_\\1 \\2 \\" >>conftest.sed
|
||||
echo '#endif/' >>conftest.sed
|
||||
echo 's/#define *\([a-z][A-Za-z0-9_]*\)\(.*\)/#ifndef '$ac_prefix_conf_LOW"_\\1 \\" >>conftest.sed
|
||||
echo '#define '$ac_prefix_conf_LOW"_\\1 \\2 \\" >>conftest.sed
|
||||
echo '#endif/' >>conftest.sed
|
||||
sed -f conftest.sed $ac_prefix_conf_INP >>$ac_prefix_conf_OUT
|
||||
echo ' ' >>$ac_prefix_conf_OUT
|
||||
echo '/*' $ac_prefix_conf_DEF '*/' >>$ac_prefix_conf_OUT
|
||||
echo '#endif' >>$ac_prefix_conf_OUT
|
||||
changequote([, ])dnl
|
||||
else
|
||||
AC_MSG_ERROR([input file $ac_prefix_conf_IN does not exist, dnl
|
||||
skip generating $ac_prefix_conf_OUT])
|
||||
fi
|
||||
rm -f conftest.*
|
||||
fi])
|
||||
|
24
config/ac_cxx_have_sstream.m4
Normal file
24
config/ac_cxx_have_sstream.m4
Normal file
@ -0,0 +1,24 @@
|
||||
dnl @synopsis AC_CXX_HAVE_SSTREAM
|
||||
dnl
|
||||
dnl If the C++ library has a working stringstream, define HAVE_SSTREAM.
|
||||
dnl
|
||||
dnl @author Ben Stanley
|
||||
dnl @version $Id: ac_cxx_have_sstream.m4,v 1.1 2001/07/07 16:05:47 smr99 Exp $
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_HAVE_SSTREAM],
|
||||
[AC_CACHE_CHECK(whether the compiler has stringstream,
|
||||
ac_cv_cxx_have_sstream,
|
||||
[AC_REQUIRE([AC_CXX_NAMESPACES])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([#include <sstream>
|
||||
#ifdef HAVE_NAMESPACES
|
||||
using namespace std;
|
||||
#endif],[stringstream message; message << "Hello"; return 0;],
|
||||
ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_have_sstream" = yes; then
|
||||
AC_DEFINE(HAVE_SSTREAM,1,[define if the compiler has stringstream])
|
||||
fi
|
||||
])
|
29
config/ac_cxx_have_strstream.m4
Normal file
29
config/ac_cxx_have_strstream.m4
Normal file
@ -0,0 +1,29 @@
|
||||
dnl @synopsis AC_CXX_HAVE_STRSTREAM
|
||||
dnl
|
||||
dnl If the C++ library has a working strstream, define HAVE_CLASS_STRSTREAM.
|
||||
dnl
|
||||
dnl Adapted from ac_cxx_have_sstream.m4 by Steve Robbins
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_HAVE_STRSTREAM],
|
||||
[AC_CACHE_CHECK(whether the library defines class strstream,
|
||||
ac_cv_cxx_have_class_strstream,
|
||||
[AC_REQUIRE([AC_CXX_NAMESPACES])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_CHECK_HEADERS(strstream)
|
||||
AC_TRY_COMPILE([
|
||||
#if HAVE_STRSTREAM
|
||||
# include <strstream>
|
||||
#else
|
||||
# include <strstream.h>
|
||||
#endif
|
||||
#ifdef HAVE_NAMESPACES
|
||||
using namespace std;
|
||||
#endif],[ostrstream message; message << "Hello"; return 0;],
|
||||
ac_cv_cxx_have_class_strstream=yes, ac_cv_cxx_have_class_strstream=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_have_class_strstream" = yes; then
|
||||
AC_DEFINE(HAVE_CLASS_STRSTREAM,1,[define if the library defines strstream])
|
||||
fi
|
||||
])
|
22
config/ac_cxx_namespaces.m4
Normal file
22
config/ac_cxx_namespaces.m4
Normal file
@ -0,0 +1,22 @@
|
||||
dnl @synopsis AC_CXX_NAMESPACES
|
||||
dnl
|
||||
dnl If the compiler can prevent names clashes using namespaces, define
|
||||
dnl HAVE_NAMESPACES.
|
||||
dnl
|
||||
dnl @version $Id: ac_cxx_namespaces.m4,v 1.1 2001/06/02 23:26:36 smr99 Exp $
|
||||
dnl @author Luc Maisonobe
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_NAMESPACES],
|
||||
[AC_CACHE_CHECK(whether the compiler implements namespaces,
|
||||
ac_cv_cxx_namespaces,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
|
||||
[using namespace Outer::Inner; return i;],
|
||||
ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_namespaces" = yes; then
|
||||
AC_DEFINE(HAVE_NAMESPACES,1,[define to 1 if the compiler implements namespaces])
|
||||
fi
|
||||
])
|
34
config/ac_cxx_rtti.m4
Normal file
34
config/ac_cxx_rtti.m4
Normal file
@ -0,0 +1,34 @@
|
||||
dnl @synopsis AC_CXX_RTTI
|
||||
dnl
|
||||
dnl If the compiler supports Run-Time Type Identification (typeinfo
|
||||
dnl header and typeid keyword), define HAVE_RTTI.
|
||||
dnl
|
||||
dnl @version $Id: ac_cxx_rtti.m4,v 1.1 2001/06/02 22:29:52 smr99 Exp $
|
||||
dnl @author Luc Maisonobe
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_RTTI],
|
||||
[AC_CACHE_CHECK(whether the compiler supports Run-Time Type Identification,
|
||||
ac_cv_cxx_rtti,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([#include <typeinfo>
|
||||
class Base { public :
|
||||
Base () {}
|
||||
virtual int f () { return 0; }
|
||||
};
|
||||
class Derived : public Base { public :
|
||||
Derived () {}
|
||||
virtual int f () { return 1; }
|
||||
};
|
||||
],[Derived d;
|
||||
Base *ptr = &d;
|
||||
return typeid (*ptr) == typeid (Derived);
|
||||
],
|
||||
ac_cv_cxx_rtti=yes, ac_cv_cxx_rtti=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_rtti" = yes; then
|
||||
AC_DEFINE(HAVE_RTTI,1,
|
||||
[define if the compiler supports Run-Time Type Identification])
|
||||
fi
|
||||
])
|
27
config/ac_cxx_string_compare_string_first.m4
Normal file
27
config/ac_cxx_string_compare_string_first.m4
Normal file
@ -0,0 +1,27 @@
|
||||
dnl @synopsis AC_CXX_STRING_COMPARE_STRING_FIRST
|
||||
dnl
|
||||
dnl If the standard library string::compare() function takes the
|
||||
dnl string as its first argument, define FUNC_STRING_COMPARE_STRING_FIRST to 1.
|
||||
dnl
|
||||
dnl @author Steven Robbins
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_STRING_COMPARE_STRING_FIRST],
|
||||
[AC_CACHE_CHECK(whether std::string::compare takes a string in argument 1,
|
||||
ac_cv_cxx_string_compare_string_first,
|
||||
[AC_REQUIRE([AC_CXX_NAMESPACES])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([#include <string>
|
||||
#ifdef HAVE_NAMESPACES
|
||||
using namespace std;
|
||||
#endif],[string x("hi"); string y("h");
|
||||
return x.compare(y,0,1) == 0;],
|
||||
ac_cv_cxx_string_compare_string_first=yes,
|
||||
ac_cv_cxx_string_compare_string_first=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_string_compare_string_first" = yes; then
|
||||
AC_DEFINE(FUNC_STRING_COMPARE_STRING_FIRST,1,
|
||||
[define if library uses std::string::compare(string,pos,n)])
|
||||
fi
|
||||
])
|
47
config/ac_dll.m4
Normal file
47
config/ac_dll.m4
Normal file
@ -0,0 +1,47 @@
|
||||
|
||||
# AC_LTDL_DLLIB
|
||||
# -------------
|
||||
AC_DEFUN([AC_LTDL_DLLIB],
|
||||
[LIBADD_DL=
|
||||
AC_SUBST(LIBADD_DL)
|
||||
|
||||
AC_CHECK_FUNC([shl_load],
|
||||
[AC_DEFINE([HAVE_SHL_LOAD], [1],
|
||||
[Define if you have the shl_load function.])],
|
||||
[AC_CHECK_LIB([dld], [shl_load],
|
||||
[AC_DEFINE([HAVE_SHL_LOAD], [1],
|
||||
[Define if you have the shl_load function.])
|
||||
LIBADD_DL="$LIBADD_DL -ldld"],
|
||||
[AC_CHECK_LIB([dl], [dlopen],
|
||||
[AC_DEFINE([HAVE_LIBDL], [1],
|
||||
[Define if you have the libdl library or equivalent.])
|
||||
LIBADD_DL="-ldl"],
|
||||
[AC_TRY_LINK([#if HAVE_DLFCN_H
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
],
|
||||
[dlopen(0, 0);],
|
||||
[AC_DEFINE([HAVE_LIBDL], [1],
|
||||
[Define if you have the libdl library or equivalent.])],
|
||||
[AC_CHECK_LIB([svld], [dlopen],
|
||||
[AC_DEFINE([HAVE_LIBDL], [1],
|
||||
[Define if you have the libdl library or equivalent.])
|
||||
LIBADD_DL="-lsvld"],
|
||||
[AC_CHECK_LIB([dld], [dld_link],
|
||||
[AC_DEFINE([HAVE_DLD], [1],
|
||||
[Define if you have the GNU dld library.])
|
||||
LIBADD_DL="$LIBADD_DL -ldld"
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
|
||||
LIBS_SAVE="$LIBS"
|
||||
LIBS="$LIBS $LIBADD_DL"
|
||||
AC_CHECK_FUNCS(dlerror)
|
||||
LIBS="$LIBS_SAVE"
|
||||
fi
|
||||
])# AC_LTDL_DLLIB
|
40
config/ax_cxx_gcc_abi_demangle.m4
Normal file
40
config/ax_cxx_gcc_abi_demangle.m4
Normal file
@ -0,0 +1,40 @@
|
||||
dnl @synopsis AX_CXX_GCC_ABI_DEMANGLE
|
||||
dnl
|
||||
dnl If the compiler supports GCC C++ ABI name demangling (has header cxxabi.h
|
||||
dnl and abi::__cxa_demangle() function), define HAVE_GCC_ABI_DEMANGLE
|
||||
dnl
|
||||
dnl Adapted from AC_CXX_RTTI by Luc Maisonobe
|
||||
dnl
|
||||
dnl @version $Id: ax_cxx_gcc_abi_demangle.m4,v 1.1 2004/02/18 20:45:36 blep Exp $
|
||||
dnl @author Neil Ferguson <nferguso@eso.org>
|
||||
dnl
|
||||
AC_DEFUN([AX_CXX_GCC_ABI_DEMANGLE],
|
||||
[AC_CACHE_CHECK(whether the compiler supports GCC C++ ABI name demangling,
|
||||
ac_cv_cxx_gcc_abi_demangle,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([#include <typeinfo>
|
||||
#include <cxxabi.h>
|
||||
#include <string>
|
||||
|
||||
template<typename TYPE>
|
||||
class A {};
|
||||
],[A<int> instance;
|
||||
int status = 0;
|
||||
char* c_name = 0;
|
||||
|
||||
c_name = abi::__cxa_demangle(typeid(instance).name(), 0, 0, &status);
|
||||
|
||||
std::string name(c_name);
|
||||
free(c_name);
|
||||
|
||||
return name == "A<int>";
|
||||
],
|
||||
ac_cv_cxx_gcc_abi_demangle=yes, ac_cv_cxx_gcc_abi_demangle=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_gcc_abi_demangle" = yes; then
|
||||
AC_DEFINE(HAVE_GCC_ABI_DEMANGLE,1,
|
||||
[define if the compiler supports GCC C++ ABI name demangling])
|
||||
fi
|
||||
])
|
27
config/ax_cxx_have_isfinite.m4
Normal file
27
config/ax_cxx_have_isfinite.m4
Normal file
@ -0,0 +1,27 @@
|
||||
dnl @synopsis AX_CXX_HAVE_ISFINITE
|
||||
dnl
|
||||
dnl If isfinite() is available to the C++ compiler:
|
||||
dnl define HAVE_ISFINITE
|
||||
dnl add "-lm" to LIBS
|
||||
dnl
|
||||
AC_DEFUN([AX_CXX_HAVE_ISFINITE],
|
||||
[ax_cxx_have_isfinite_save_LIBS=$LIBS
|
||||
LIBS="$LIBS -lm"
|
||||
|
||||
AC_CACHE_CHECK(for isfinite, ax_cv_cxx_have_isfinite,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <math.h>]],
|
||||
[[int f = isfinite( 3 );]])],
|
||||
[ax_cv_cxx_have_isfinite=yes],
|
||||
[ax_cv_cxx_have_isfinite=no])
|
||||
AC_LANG_RESTORE])
|
||||
|
||||
if test "$ax_cv_cxx_have_isfinite" = yes; then
|
||||
AC_DEFINE([HAVE_ISFINITE],1,[define if compiler has isfinite])
|
||||
else
|
||||
LIBS=$ax_cxx_have_isfinite_save_LIBS
|
||||
fi
|
||||
])
|
34
config/bb_enable_doxygen.m4
Normal file
34
config/bb_enable_doxygen.m4
Normal file
@ -0,0 +1,34 @@
|
||||
AC_DEFUN([BB_ENABLE_DOXYGEN],
|
||||
[
|
||||
AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)])
|
||||
AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)])
|
||||
AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
|
||||
AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no])
|
||||
if test "x$enable_doxygen" = xno; then
|
||||
enable_doc=no
|
||||
else
|
||||
AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
|
||||
if test "x$DOXYGEN" = x; then
|
||||
if test "x$enable_doxygen" = xyes; then
|
||||
AC_MSG_ERROR([could not find doxygen])
|
||||
fi
|
||||
enable_doc=no
|
||||
else
|
||||
enable_doc=yes
|
||||
AC_PATH_PROG(DOT, dot, , $PATH)
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
|
||||
|
||||
if test x$DOT = x; then
|
||||
if test "x$enable_dot" = xyes; then
|
||||
AC_MSG_ERROR([could not find dot])
|
||||
fi
|
||||
enable_dot=no
|
||||
else
|
||||
enable_dot=yes
|
||||
fi
|
||||
AC_SUBST(enable_dot)
|
||||
AC_SUBST(enable_html_docs)
|
||||
AC_SUBST(enable_latex_docs)
|
||||
])
|
1526
config/config.guess
vendored
Executable file
1526
config/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
100
config/config.h.in
Normal file
100
config/config.h.in
Normal file
@ -0,0 +1,100 @@
|
||||
/* config/config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* define if library uses std::string::compare(string,pos,n) */
|
||||
#undef FUNC_STRING_COMPARE_STRING_FIRST
|
||||
|
||||
/* define if the library defines strstream */
|
||||
#undef HAVE_CLASS_STRSTREAM
|
||||
|
||||
/* Define to 1 if you have the <cmath> header file. */
|
||||
#undef HAVE_CMATH
|
||||
|
||||
/* Define if you have the GNU dld library. */
|
||||
#undef HAVE_DLD
|
||||
|
||||
/* Define to 1 if you have the `dlerror' function. */
|
||||
#undef HAVE_DLERROR
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `finite' function. */
|
||||
#undef HAVE_FINITE
|
||||
|
||||
/* define if the compiler supports GCC C++ ABI name demangling */
|
||||
#undef HAVE_GCC_ABI_DEMANGLE
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* define if compiler has isfinite */
|
||||
#undef HAVE_ISFINITE
|
||||
|
||||
/* Define if you have the libdl library or equivalent. */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* define to 1 if the compiler implements namespaces */
|
||||
#undef HAVE_NAMESPACES
|
||||
|
||||
/* define if the compiler supports Run-Time Type Identification */
|
||||
#undef HAVE_RTTI
|
||||
|
||||
/* Define if you have the shl_load function. */
|
||||
#undef HAVE_SHL_LOAD
|
||||
|
||||
/* define if the compiler has stringstream */
|
||||
#undef HAVE_SSTREAM
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <strstream> header file. */
|
||||
#undef HAVE_STRSTREAM
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 to use type_info::name() for class names */
|
||||
#undef USE_TYPEINFO_NAME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
1658
config/config.sub
vendored
Executable file
1658
config/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
589
config/depcomp
Executable file
589
config/depcomp
Executable file
@ -0,0 +1,589 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2007-03-29.01
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
519
config/install-sh
Executable file
519
config/install-sh
Executable file
@ -0,0 +1,519 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2006-12-25.00
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
6964
config/ltmain.sh
Normal file
6964
config/ltmain.sh
Normal file
File diff suppressed because it is too large
Load Diff
367
config/missing
Executable file
367
config/missing
Executable file
@ -0,0 +1,367 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
155
configure.in
Normal file
155
configure.in
Normal file
@ -0,0 +1,155 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(Makefile.am)
|
||||
|
||||
# autoconf 2.50 or higher to rebuild aclocal.m4, because the
|
||||
# AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro.
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
# Making releases:
|
||||
# CPPUNIT_MICRO_VERSION += 1;
|
||||
# CPPUNIT_INTERFACE_AGE += 1;
|
||||
# CPPUNIT_BINARY_AGE += 1;
|
||||
# if any functions have been added, set CPPUNIT_INTERFACE_AGE to 0.
|
||||
# if backwards compatibility has been broken,
|
||||
# set CPPUNIT_BINARY_AGE and CPPUNIT_INTERFACE_AGE to 0.
|
||||
#
|
||||
CPPUNIT_MAJOR_VERSION=1
|
||||
CPPUNIT_MINOR_VERSION=12
|
||||
CPPUNIT_MICRO_VERSION=1
|
||||
CPPUNIT_INTERFACE_AGE=0
|
||||
CPPUNIT_BINARY_AGE=0
|
||||
CPPUNIT_VERSION=$CPPUNIT_MAJOR_VERSION.$CPPUNIT_MINOR_VERSION.$CPPUNIT_MICRO_VERSION
|
||||
AC_SUBST(CPPUNIT_MAJOR_VERSION)
|
||||
AC_SUBST(CPPUNIT_MINOR_VERSION)
|
||||
AC_SUBST(CPPUNIT_MICRO_VERSION)
|
||||
AC_SUBST(CPPUNIT_INTERFACE_AGE)
|
||||
AC_SUBST(CPPUNIT_BINARY_AGE)
|
||||
AC_SUBST(CPPUNIT_VERSION)
|
||||
|
||||
# libtool versioning
|
||||
LT_RELEASE=$CPPUNIT_MAJOR_VERSION.$CPPUNIT_MINOR_VERSION
|
||||
LT_CURRENT=`expr $CPPUNIT_MICRO_VERSION - $CPPUNIT_INTERFACE_AGE`
|
||||
LT_REVISION=$CPPUNIT_INTERFACE_AGE
|
||||
LT_AGE=`expr $CPPUNIT_BINARY_AGE - $CPPUNIT_INTERFACE_AGE`
|
||||
AC_SUBST(LT_RELEASE)
|
||||
AC_SUBST(LT_CURRENT)
|
||||
AC_SUBST(LT_REVISION)
|
||||
AC_SUBST(LT_AGE)
|
||||
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AM_CONFIG_HEADER(config/config.h)
|
||||
AM_INIT_AUTOMAKE(cppunit, $CPPUNIT_VERSION)
|
||||
|
||||
# General "with" options
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
dnl Checks for programs.
|
||||
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# The libtool macro AC_PROG_LIBTOOL checks for the C preprocessor.
|
||||
# Configure gets confused if we try to check for a C preprocessor
|
||||
# without first checking for the C compiler
|
||||
# (see http://sources.redhat.com/ml/autoconf/2001-07/msg00036.html),
|
||||
# so we invoke AC_PROG_CC explicitly.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_LANG(C++)
|
||||
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
# check for dlopen,dlsym... or shl_load, shl_findsym...
|
||||
AC_LTDL_DLLIB
|
||||
|
||||
# check for doxygen
|
||||
BB_ENABLE_DOXYGEN
|
||||
|
||||
|
||||
# Check for headers
|
||||
# Note that the fourth argument to AC_CHECK_HEADERS is non-empty to force
|
||||
# the configure probe to try compiling "#include <header>". See autoconf docs.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
AC_CHECK_HEADERS(cmath,[],[],[/**/])
|
||||
|
||||
# Check for compiler characteristics
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
AC_CXX_RTTI
|
||||
AX_CXX_GCC_ABI_DEMANGLE
|
||||
AC_CXX_STRING_COMPARE_STRING_FIRST
|
||||
|
||||
|
||||
# Check for library functions
|
||||
# ----------------------------------------------------------------------------
|
||||
AC_CXX_HAVE_SSTREAM
|
||||
AC_CXX_HAVE_STRSTREAM
|
||||
AX_CXX_HAVE_ISFINITE
|
||||
AC_CHECK_FUNCS(finite)
|
||||
|
||||
cppunit_val='CPPUNIT_HAVE_RTTI'
|
||||
AC_ARG_ENABLE(typeinfo-name,
|
||||
[ --disable-typeinfo-name disable use of RTTI for class names],
|
||||
[
|
||||
test x$enableval = 'xno' && cppunit_val='0'
|
||||
])
|
||||
|
||||
AC_DEFINE_UNQUOTED(USE_TYPEINFO_NAME,$cppunit_val,
|
||||
[Define to 1 to use type_info::name() for class names])
|
||||
|
||||
|
||||
# Doesn't work. It's supposed to add "#define CPPUNIT_NO_TESTPLUGIN" if
|
||||
# --disable-test-plugin was used on the command line.
|
||||
#
|
||||
#
|
||||
#
|
||||
#AC_ARG_ENABLE(test-plugin,
|
||||
#[ --disable-test-plugin disable support for test plug-ins],
|
||||
#[
|
||||
# if test -n "$enable_test_plugin"; then
|
||||
# enable_test_plugin=${enable_test_plugin_default-yes}
|
||||
# fi
|
||||
# if test "$enable_test_plugin" = no; then
|
||||
#echo "test-plug in disabled"
|
||||
# fi
|
||||
#])
|
||||
#
|
||||
#testplugin_val=1
|
||||
#AC_DEFINE_UNQUOTED(NO_TESTPLUGIN,$testplugin_val,
|
||||
#[defined to disable TestPlugIn])
|
||||
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
cppunit.pc
|
||||
cppunit.spec
|
||||
cppunit-config
|
||||
src/Makefile
|
||||
src/DllPlugInTester/Makefile
|
||||
src/cppunit/Makefile
|
||||
include/Makefile
|
||||
include/cppunit/Makefile
|
||||
include/cppunit/config/Makefile
|
||||
include/cppunit/extensions/Makefile
|
||||
include/cppunit/plugin/Makefile
|
||||
include/cppunit/portability/Makefile
|
||||
include/cppunit/tools/Makefile
|
||||
include/cppunit/ui/Makefile
|
||||
include/cppunit/ui/mfc/Makefile
|
||||
include/cppunit/ui/qt/Makefile
|
||||
include/cppunit/ui/text/Makefile
|
||||
doc/Makefile
|
||||
doc/Doxyfile
|
||||
examples/Makefile
|
||||
examples/simple/Makefile
|
||||
examples/hierarchy/Makefile
|
||||
examples/cppunittest/Makefile
|
||||
examples/ClockerPlugIn/Makefile
|
||||
examples/DumperPlugIn/Makefile
|
||||
examples/money/Makefile
|
||||
],[chmod a+x cppunit-config])
|
||||
|
||||
AC_CREATE_PREFIX_CONFIG_H([include/cppunit/config-auto.h],
|
||||
$PACKAGE, [config/config.h])
|
BIN
contrib/bc5/bcc-makefile.zip
Normal file
BIN
contrib/bc5/bcc-makefile.zip
Normal file
Binary file not shown.
170
contrib/msvc/AddingUnitTestMethod.dsm
Normal file
170
contrib/msvc/AddingUnitTestMethod.dsm
Normal file
@ -0,0 +1,170 @@
|
||||
'Made by bloodchen
|
||||
'bloodchen@hotmail.com
|
||||
Sub NewTestClass
|
||||
On Error Resume Next
|
||||
dim proj_path,ext,pos,proj_dir,MyCppFile,MyCppName,MyHFile,MyHName,ClassName,HText,CPPText
|
||||
proj_path = ActiveProject.fullname
|
||||
ext = ""
|
||||
pos = len (proj_path)
|
||||
Do While ext <> "\"
|
||||
ext = Mid(proj_path, pos, 1)
|
||||
pos = pos -1
|
||||
Loop
|
||||
proj_dir = left(proj_path, pos+1)
|
||||
ClassName=InputBox("Enter the class name:", "Class Name")
|
||||
if ActiveProject.Type <> "Build" then
|
||||
MsgBox "This project is not valid. Ending macro."
|
||||
Exit Sub
|
||||
end if
|
||||
if (len(ClassName) <= 0) then
|
||||
MsgBox "Invalid class name. Ending macro."
|
||||
Exit Sub
|
||||
end if
|
||||
|
||||
' ClassName="CTest"
|
||||
MyCppName=proj_dir+ClassName+".cpp"
|
||||
MyHName=proj_dir+ClassName+".h"
|
||||
ActiveProject.AddFile MyCppName
|
||||
ActiveProject.AddFile MyHName
|
||||
Documents.Add "Text"
|
||||
ActiveDocument.Selection.StartOfDocument
|
||||
|
||||
HText= "#ifndef "+ClassName+"DEF"+VbCrLf& _
|
||||
"#define "+ClassName+"DEF"+VbCrLf& _
|
||||
""+VbCrLf& _
|
||||
"#include <cppunit\testcase.h>"+VbCrLf& _
|
||||
"#include <cppunit\extensions\HelperMacros.h>"+VbCrLf& _
|
||||
"class "+ClassName+":public CppUnit::TestCase"+VbCrLf& _
|
||||
"{"+VbCrLf& _
|
||||
" CPPUNIT_TEST_SUITE( "+ClassName+" );"+VbCrLf& _
|
||||
" CPPUNIT_TEST_SUITE_END();"+VbCrLf& _
|
||||
"public:"+VbCrLf& _
|
||||
" "+ClassName+"();"+VbCrLf& _
|
||||
" virtual ~"+ClassName+"();"+VbCrLf& _
|
||||
"};"+VbCrLf& _
|
||||
"#endif"+VbCrLf
|
||||
ActiveDocument.Selection = HText
|
||||
ActiveDocument.Save MyHName
|
||||
' WriteFile MyHName,HText
|
||||
Documents.Add "Text"
|
||||
ActiveDocument.Selection.StartOfDocument
|
||||
CPPText = "#include "+chr(34)+"stdafx.h"+chr(34)+VbCrLf& _
|
||||
"#include "+chr(34)+ClassName+".h"+chr(34)+VbCrLf& _
|
||||
""+VbCrLf& _
|
||||
""+VbCrLf& _
|
||||
"CPPUNIT_TEST_SUITE_REGISTRATION( "+ClassName+ " );"+VbCrLf& _
|
||||
""+VbCrLf& _
|
||||
""+VbCrLf& _
|
||||
ClassName+"::"+ClassName+"()"+VbCrLf& _
|
||||
"{"+VbCrLf& _
|
||||
"}"+VbCrLf& _
|
||||
""+VbCrLf& _
|
||||
""+VbCrLf& _
|
||||
ClassName+"::~"+ClassName+"()"+VbCrLf& _
|
||||
"{"+VbCrLf& _
|
||||
"}"
|
||||
' WriteFile MyCppName,CPPText
|
||||
ActiveDocument.Selection = CPPText
|
||||
ActiveDocument.Save MyCppName
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub ToggleHandCPP()
|
||||
'DESCRIPTION: Opens the .cpp or .h file for the current document.
|
||||
'Toggles between the .cpp & .h file
|
||||
ext = ActiveDocument.FullName
|
||||
If ext = "" Then
|
||||
msgbox ("Error, not a .cpp or .h file")
|
||||
exit sub
|
||||
End If
|
||||
DocName = UCase(ext)
|
||||
|
||||
If Right(DocName,4) = ".CPP" Then
|
||||
fn = left(DocName, Len(DocName)-3) & "h"
|
||||
ElseIf Right(DocName,2) = ".H" Then
|
||||
fn = Left(DocName, Len(DocName)-1) & "cpp"
|
||||
Else
|
||||
msgbox ("Error, not a .cpp or a .h file")
|
||||
exit sub
|
||||
End If
|
||||
'msgbox (fn)
|
||||
on error resume next
|
||||
Documents.Open (fn)
|
||||
End Sub
|
||||
|
||||
Sub ADDTestMethod()
|
||||
strHpt = ActiveDocument.FullName
|
||||
if right(strHpt,3) = "CPP" Or right (strHpt,3) = "cpp" Then
|
||||
ActiveDocument.Selection.SelectLine
|
||||
strText = ActiveDocument.Selection.Text
|
||||
if (Instr(strText, "::" ) = 0) Then
|
||||
MsgBox("Line not valid !!")
|
||||
Exit Sub
|
||||
End If
|
||||
else exit sub
|
||||
end if
|
||||
|
||||
pos = Instr(strText, "::")
|
||||
strName = Right(strText, (Len(strText) - (pos+1)))
|
||||
pos = Instr(strName,"(")
|
||||
strName = Left(strName,pos-1)
|
||||
strClass = Left(strText,pos - 1)
|
||||
while (instr(strClass, " ") > 0)
|
||||
pos = instr(strClass, " ")
|
||||
strTyp = strTyp & Left(strClass, pos)
|
||||
strClass = Right(strClass, Len(strClass) - (pos) )
|
||||
wend
|
||||
ToggleHandCPP
|
||||
|
||||
ActiveDocument.Selection.SelectAll
|
||||
strHead = ActiveDocument.Selection.Text
|
||||
|
||||
if (instr(strHead,strClass) = 0) Then
|
||||
MsgBox(" Can't find class " & strClass & " !!")
|
||||
ToggleHandCPP
|
||||
Exit Sub
|
||||
End If
|
||||
ActiveDocument.Selection.EndOfDocument
|
||||
lineBottom = ActiveDocument.Selection.CurrentLine
|
||||
|
||||
ActiveDocument.Selection.StartOfDocument
|
||||
ActiveDocument.Selection.StartOfLine
|
||||
ActiveDocument.Selection.SelectLine
|
||||
strLine = ActiveDocument.Selection.Text
|
||||
while (instr(strLine, strName) = 0 And ActiveDocument.Selection.CurrentLine <> lineBottom)
|
||||
ActiveDocument.Selection.StartOfLine
|
||||
ActiveDocument.Selection.LineDown dsMove
|
||||
ActiveDocument.Selection.SelectLine
|
||||
strLine = ActiveDocument.Selection.Text
|
||||
Wend
|
||||
if (ActiveDocument.Selection.CurrentLine < lineBottom) Then
|
||||
if( instr(strLine, "CPPUNIT_TEST" ) <> 0 )Then
|
||||
ToggleHandCPP
|
||||
Exit Sub
|
||||
end if
|
||||
End If
|
||||
|
||||
ActiveDocument.Selection.StartOfDocument
|
||||
ActiveDocument.Selection.StartOfLine
|
||||
ActiveDocument.Selection.SelectLine
|
||||
strLine = ActiveDocument.Selection.Text
|
||||
while (instr(strLine, " CPPUNIT_TEST_SUITE_END();" ) = 0 And ActiveDocument.Selection.CurrentLine <> lineBottom)
|
||||
ActiveDocument.Selection.StartOfLine
|
||||
ActiveDocument.Selection.LineDown dsMove
|
||||
ActiveDocument.Selection.SelectLine
|
||||
strLine = ActiveDocument.Selection.Text
|
||||
Wend
|
||||
if (ActiveDocument.Selection.CurrentLine < lineBottom) Then
|
||||
ActiveDocument.Selection.EndOfLine
|
||||
ActiveDocument.Selection.LineUp
|
||||
ActiveDocument.Selection.EndOfLine
|
||||
ActiveDocument.Selection.NewLine
|
||||
ActiveDocument.Selection = "CPPUNIT_TEST( "&strName&" );"
|
||||
else
|
||||
MsgBox("CPPUNIT_TEST_SUITE_END not found")
|
||||
end if
|
||||
ToggleHandCPP
|
||||
|
||||
End Sub
|
||||
|
486
contrib/msvc/CppUnit.WWTpl
Normal file
486
contrib/msvc/CppUnit.WWTpl
Normal file
@ -0,0 +1,486 @@
|
||||
Baptiste Lepilleur's template file.
|
||||
(@)Copyright 2001, Baptiste Lepilleur <gaiacrtn@free.fr>.
|
||||
|
||||
|
||||
|
||||
[-ExtractPath]
|
||||
!!Memo
|
||||
Extract the path from a full filename.
|
||||
path is the filename we need to extract the path from.
|
||||
returns: extracted path.
|
||||
Algo: we iterates the filename from the end until we found a character '\'.
|
||||
!!End
|
||||
|
||||
!!Params
|
||||
path @@(ProjectPath)@@
|
||||
!!End
|
||||
|
||||
!!Code
|
||||
Input path: "@@path@@"
|
||||
!!Set index @@(Strlen @@path@@)@@
|
||||
!!//
|
||||
!!Set finalpath
|
||||
!!Label LoopExtractPath
|
||||
!!Sub index 1
|
||||
!!If @@index@@ < 0
|
||||
!!Goto EndExtractPath
|
||||
!!Endif
|
||||
!!//
|
||||
!!Set lastchar @@(StrSub @@path@@ @@index@@ 1)@@
|
||||
!!If @@lastchar@@ != "\"
|
||||
!!Goto LoopExtractPath
|
||||
!!Endif
|
||||
!!//
|
||||
!!Add index 1
|
||||
!!Set finalpath @@(StrSub @@path@@ 0 @@index@@)@@
|
||||
!!//
|
||||
!!Label EndExtractPath
|
||||
!!Return @@finalpath@@
|
||||
!!End
|
||||
|
||||
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
---------------------------------------------------------------------------------
|
||||
---------------------------------------------------------------------------------
|
||||
---------------------------------------------------------------------------------
|
||||
[+01 Create Class in file]
|
||||
!!Memo
|
||||
Creates a new class in new files (.h/.cpp) and adds them to the project.
|
||||
!!End
|
||||
|
||||
!!Params
|
||||
classname Ttr
|
||||
parentclassname =
|
||||
classdesc This class represents
|
||||
objectkind Reference Object
|
||||
hasserialize 0
|
||||
isrefobj 0
|
||||
inlinectordtor 0
|
||||
createfile 1
|
||||
isunittest 0
|
||||
!!End
|
||||
|
||||
!!Dialog
|
||||
<html><body>
|
||||
Class name: <input type=text id=classname size=40><br>
|
||||
Brief description: <input type=text id=classdesc size=68><br>
|
||||
Object Kind:
|
||||
<select name="Object Kind" id=objectkind>
|
||||
<option>Default Value Object</option>
|
||||
<option>Explicit Value Object</option>
|
||||
<option>Reference Object</option>
|
||||
</select><br>
|
||||
|
||||
Parent class name: <input type=text id=parentclassname size=40><br>
|
||||
|
||||
<input type=checkbox id=createfile>
|
||||
Create a new file ? (otherwise Insert in current file).<br>
|
||||
<br>
|
||||
<input type=checkbox id=hasserialize>
|
||||
Has: virtual void Serialize( CArchive &ar )<br>
|
||||
<input type=checkbox id=isrefobj>
|
||||
Is a reference counted object (inherit ERefObj)<br>
|
||||
<input type=checkbox id=inlinectordtor>
|
||||
Inline ctor/dtor, copy ctor/operator.<br>
|
||||
<input type=checkbox id=isunittest>
|
||||
Is a CppUnit unit test.<br>
|
||||
|
||||
<!--Base filename: <input type=text id=classbasepath size=64><br> -->
|
||||
|
||||
|
||||
<!--<p>Filename: <input type=file id=classhfn accept="*.h" size=40></p> -->
|
||||
<!--<p>Filename: <input type=file id=classcppfn accept="*.h" size=40></p> -->
|
||||
</body></html>
|
||||
!!End
|
||||
|
||||
!!Code
|
||||
!!// Set variable that indicates the kind of object we are working on.
|
||||
!!Set defvalobject 0
|
||||
!!If @@objectkind@@ == "Default Value Object"
|
||||
!!Set defvalobject 1
|
||||
!!Endif
|
||||
!!//
|
||||
!!Set valobject 0
|
||||
!!If @@objectkind@@ == "Explicit Value Object"
|
||||
!!Set valobject 1
|
||||
!!Endif
|
||||
!!//
|
||||
!!Set refobject 0
|
||||
!!If @@objectkind@@ == "Reference Object"
|
||||
!!Set refobject 1
|
||||
!!Endif
|
||||
!!//
|
||||
!!// Set class filename (relative to dsp)
|
||||
!!Set headerfn @@classname@@.h
|
||||
!!Set implfn @@classname@@.cpp
|
||||
!!Set headerdefine @@(String @@(Call -MakeHeaderDefined fn @@headerfn@@)@@:U)@@
|
||||
!!//
|
||||
!!// hasparentclass indicates if a parent class has been defined.
|
||||
!!Set hasparentclass 0
|
||||
!!If @@parentclassname@@ != =
|
||||
!!Set hasparentclass 1
|
||||
!!Else
|
||||
!!If @@isunittest@@
|
||||
!!Set parentclassname CppUnit::TestFixture
|
||||
!!Set hasparentclass 1
|
||||
!!Endif
|
||||
!!Endif
|
||||
!!//
|
||||
!!// hasparent is set to 1 if the class has some parent (ERefObj or parentclass).
|
||||
!!Set hasparent @@hasparentclass@@
|
||||
!!If @@isrefobj@@
|
||||
!!Set hasparent 1
|
||||
!!Endif
|
||||
!!//
|
||||
!!//
|
||||
!!// All variables are set, we can now generates the class.
|
||||
!!//
|
||||
!!//
|
||||
!!//
|
||||
!!//
|
||||
!!// ----------------------------------------------------------------------------
|
||||
!!// ------------------------------ header file ---------------------------------
|
||||
!!// ----------------------------------------------------------------------------
|
||||
!!//
|
||||
!!//
|
||||
!!//
|
||||
!!If @@createfile@@
|
||||
!!FileNew @@headerfn@@ dsp
|
||||
!!Set headerpath @@(FilePath)@@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Header file @@headerfn@@ for class @@classname@@
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: @@(Date "yyyy/MM/dd")@@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#ifndef @@headerdefine@@
|
||||
#define @@headerdefine@@
|
||||
!!Else
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Definition of class @@classname@@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
!!Endif
|
||||
!!If @@hasparentclass@@
|
||||
|
||||
!!If @@isunittest@@
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
!!Else
|
||||
#include "@@parentclassname@@.h"
|
||||
!!Endif
|
||||
!!Endif
|
||||
|
||||
|
||||
!!If @@isrefobj@@
|
||||
/*! Declare @@classname@@Ref as a reference pointer on @@classname@@.
|
||||
*/
|
||||
EDECL_REF( @@classname@@ );
|
||||
|
||||
|
||||
|
||||
!!Endif
|
||||
/*! \class @@classname@@
|
||||
* \brief @@classdesc@@
|
||||
*/
|
||||
class @@classname@@@@\
|
||||
!!// Write inherited class list (parent class first, then ERefObj if inherited).
|
||||
!!If @@hasparent@@
|
||||
: @@\
|
||||
!!// xpos contains the indentation level for inheritance declarations...
|
||||
!!GetPos xpos ypos
|
||||
!!Sub xpos 1
|
||||
public @@\
|
||||
!!Else
|
||||
|
||||
!!Endif
|
||||
!!If @@hasparentclass@@
|
||||
@@parentclassname@@@@\
|
||||
!!If @@isrefobj@@
|
||||
,
|
||||
@@(Call -MakeFiller filler " " count @@xpos@@)@@@@\
|
||||
public @@\
|
||||
!!Else
|
||||
|
||||
!!Endif
|
||||
!!Endif
|
||||
!!If @@isrefobj@@
|
||||
ERefObj
|
||||
!!Endif
|
||||
{
|
||||
!!//
|
||||
!!//
|
||||
!!// ------------ Done with inheritance, declare the class body... ----------
|
||||
!!//
|
||||
!!//
|
||||
!!If @@isunittest@@
|
||||
CPPUNIT_TEST_SUITE( @@classname@@ );
|
||||
CPPUNIT_TEST( putTestMethodNameHere );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
!!Endif
|
||||
public:
|
||||
!!If !@@defvalobject@@
|
||||
/*! Constructs a @@classname@@ object.
|
||||
*/
|
||||
@@classname@@();
|
||||
|
||||
!!Endif
|
||||
!!If @@valobject@@
|
||||
/*! Copy constructor.
|
||||
* @param copy Object to copy.
|
||||
*/
|
||||
@@classname@@( const @@classname@@ © );
|
||||
|
||||
!!Endif
|
||||
/// Destructor.
|
||||
virtual ~@@classname@@();
|
||||
!!If @@valobject@@
|
||||
|
||||
/*! Copy operator.
|
||||
* @param copy Object to copy.
|
||||
* @return Reference on this object.
|
||||
*/
|
||||
@@classname@@ &operator =( const @@classname@@ © );
|
||||
!!Endif
|
||||
!!If @@isunittest@@
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
!!Endif
|
||||
!!// Private for methods
|
||||
!!If @@refobject@@
|
||||
|
||||
private:
|
||||
/// Prevents the use of the copy constructor.
|
||||
@@classname@@( const @@classname@@ © );
|
||||
|
||||
/// Prevents the use of the copy operator.
|
||||
void operator =( const @@classname@@ © );
|
||||
!!Endif
|
||||
!!// Private for member datas
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
!!If @@createfile@@
|
||||
// Inlines methods for @@classname@@:@@\
|
||||
!!GetPos xpos ypos
|
||||
!!Sub xpos 4
|
||||
|
||||
// @@(Call -MakeFiller filler - count @@xpos@@)@@
|
||||
!!Endif //@@createfile@@
|
||||
!!If @@inlinectordtor@@
|
||||
!!If !@@defvalobject@@
|
||||
|
||||
|
||||
inline
|
||||
@@classname@@::@@classname@@()@@\
|
||||
!!If @@hasparentclass@@
|
||||
:
|
||||
@@parentclassname@@()
|
||||
!!Else
|
||||
|
||||
!!Endif
|
||||
{
|
||||
}
|
||||
!!Endif //!@@defvalobject@@
|
||||
!!If @@valobject@@
|
||||
|
||||
|
||||
inline
|
||||
@@classname@@::@@classname@@( const @@classname@@ © )@@\
|
||||
!!If @@hasparentclass@@
|
||||
:
|
||||
@@parentclassname@@( copy )
|
||||
!!Else
|
||||
|
||||
!!Endif
|
||||
!!Endif //@@valobject@@
|
||||
|
||||
|
||||
inline
|
||||
@@classname@@::~@@classname@@()
|
||||
{
|
||||
}
|
||||
!!If @@valobject@@
|
||||
|
||||
|
||||
inline @@classname@@ &
|
||||
@@classname@@::operator =( const @@classname@@ © )
|
||||
{
|
||||
|
||||
return *this;
|
||||
}
|
||||
!!Endif //@@valobject@@
|
||||
!!Endif //@@inlinectordtor@@
|
||||
|
||||
|
||||
!!If @@createfile@@
|
||||
|
||||
#endif // @@headerdefine@@
|
||||
!!FileSave
|
||||
!!ProjectFileAdd
|
||||
!!Endif
|
||||
!!//
|
||||
!!//
|
||||
!!//
|
||||
!!// ----------------------------------------------------------------------------
|
||||
!!// -------------------------- Implementation file -----------------------------
|
||||
!!// ----------------------------------------------------------------------------
|
||||
!!//
|
||||
!!//
|
||||
!!//
|
||||
!!If @@createfile@@
|
||||
!!FileNew @@implfn@@ dsp
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Implementation file @@implfn@@ for class @@classname@@
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: @@(Date "yyyy/MM/dd")@@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "@@headerfn@@"
|
||||
!!Else
|
||||
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Implementation of class @@classname@@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
!!Endif
|
||||
!!If @@isunittest@@
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION( @@classname@@ );
|
||||
!!Endif
|
||||
!!If !@@inlinectordtor@@
|
||||
!!If !@@defvalobject@@
|
||||
|
||||
|
||||
@@classname@@::@@classname@@()@@\
|
||||
!!If @@hasparentclass@@
|
||||
:
|
||||
@@parentclassname@@()
|
||||
!!Else
|
||||
|
||||
!!Endif
|
||||
{
|
||||
}
|
||||
!!Endif
|
||||
!!If @@valobject@@
|
||||
|
||||
|
||||
@@classname@@::@@classname@@( const @@classname@@ © )@@\
|
||||
!!If @@hasparentclass@@
|
||||
:
|
||||
@@parentclassname@@( copy )
|
||||
!!Else
|
||||
|
||||
!!Endif
|
||||
{
|
||||
}
|
||||
!!Endif
|
||||
|
||||
|
||||
@@classname@@::~@@classname@@()
|
||||
{
|
||||
}
|
||||
!!If @@valobject@@
|
||||
|
||||
|
||||
@@classname@@ &
|
||||
@@classname@@::operator =( const @@classname@@ © )
|
||||
{
|
||||
|
||||
return *this;
|
||||
}
|
||||
!!Endif
|
||||
!!Endif
|
||||
!!If @@isunittest@@
|
||||
|
||||
|
||||
void
|
||||
@@classname@@::setUp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
@@classname@@::tearDown()
|
||||
{
|
||||
}
|
||||
!!Endif
|
||||
|
||||
!!If @@createfile@@
|
||||
!!FileSave
|
||||
!!ProjectFileAdd
|
||||
!!//ExecuteCommand FileOpen "@@headerpath@@"
|
||||
!!Endif
|
||||
!!End
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
---------------------------------------------------------------------------------
|
||||
[-Dummy]
|
||||
!!Code
|
||||
!!End
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
------------------------ [-MakeHeaderDefined] -------------------------------
|
||||
---------------------------------------------------------------------------------
|
||||
[-MakeHeaderDefined]
|
||||
!!Memo
|
||||
This template replace all occurences of '.' in the specified filename "fn" by '_'.
|
||||
This is typically used to make the #ifndef at the beginning of header files.
|
||||
Parameters: "fn" filename in which each occurence of '.' is replaced by '_'.
|
||||
Returns: Transformed filename.
|
||||
!!End
|
||||
|
||||
!!Params
|
||||
fn TestDoIt
|
||||
!!End
|
||||
|
||||
!!Code
|
||||
!!Set result @@fn@@
|
||||
!!Label LoopMakeHeaderDefined
|
||||
!!Set fn @@result@@
|
||||
!!// Check if there is any occurence left of '.'
|
||||
!!Set index @@(StrFind @@fn@@ ".")@@
|
||||
!!If @@index@@ < 0
|
||||
!!Goto EndMakeHeaderDefined
|
||||
!!Endif
|
||||
!!// Replace occurences of '.' in fb by '_' and set to result.
|
||||
!!Set result @@(StrSub @@fn@@ 0 @@index@@ )@@_
|
||||
!!Add index 1
|
||||
!!Set result @@result@@@@(StrSub @@fn@@ @@index@@)@@
|
||||
!!Goto LoopMakeHeaderDefined
|
||||
!!Label EndMakeHeaderDefined
|
||||
!!Return @@result@@
|
||||
!!End
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
---------------------------- [-MakeFiller] ----------------------------------
|
||||
---------------------------------------------------------------------------------
|
||||
[-MakeFiller]
|
||||
!!Memo
|
||||
Make a string that contains "count" occurrence of "filler".
|
||||
Parameters: "filler" String that is repeated.
|
||||
"count" Number of times the "filler" is repeated.
|
||||
Returns: A string that contains "count" times the string "filler".
|
||||
!!End
|
||||
|
||||
!!Params
|
||||
filler -
|
||||
count 10
|
||||
!!End
|
||||
|
||||
!!Code
|
||||
!!Set result
|
||||
!!Label LoopMakerFiller
|
||||
!!If @@count@@ > 0
|
||||
!!Set result @@result@@@@filler@@
|
||||
!!Sub count 1
|
||||
!!Goto LoopMakerFiller
|
||||
!!Endif
|
||||
!!Return @@result@@
|
||||
!!End
|
10
contrib/msvc/readme.txt
Normal file
10
contrib/msvc/readme.txt
Normal file
@ -0,0 +1,10 @@
|
||||
What's in those files:
|
||||
|
||||
* CppUnit.WWTpl: a template Workspace Whiz! which create a new class
|
||||
and add the new files to the project. You can specify that the class is a
|
||||
CppUnit testcase and all the macro will be defined to register the test case
|
||||
and declare the test suite. Workspace Whiz! is an add-ins for VC++. It can
|
||||
be found at: http://www.workspacewhiz.com/.
|
||||
|
||||
* AddingUnitTestMethod.dsm: a set of VC++ macro to add unit test
|
||||
using helper macros.
|
125
contrib/xml-xsl/report.xsl
Normal file
125
contrib/xml-xsl/report.xsl
Normal file
@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding='shift_jis' standalone='yes' ?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xml:lang="ja">
|
||||
|
||||
<xsl:template match="/">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Test Report</TITLE>
|
||||
<STYLE>
|
||||
TABLE { color:#222222; font-size:10pt; font-family:'MS ゴシック' 'sanserif'; }
|
||||
TH { font-weight:normal; color:#FFFFFF; background-color:#888888; }
|
||||
TR.check { background-color:#EEEEEE }
|
||||
TD.check { background-color:#EEEEEE }
|
||||
H1 { color:#111111; font-family:'Times New Roman' 'MS P明朝' 'serif'; border-style:solid; border-width:0px; border-bottom-width:3px; border-bottom-color:#444488; }
|
||||
H2 { color:#222222; font-family:'Times New Roman' 'MS P明朝' 'serif'; border-style:solid; border-width:0px; border-bottom-width:2px; border-bottom-color:#444488; }
|
||||
H3 { color:#333333; font-family:'Times New Roman' 'MS P明朝' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#444488; margin-bottom:8px; }
|
||||
H4 { color:#444444; font-family:'Times New Roman' 'MS P明朝' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#CCCCDD; margin-bottom:8px; }
|
||||
H5 { color:#555555; font-family:'Times New Roman' 'MS P明朝' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#EEEEFF; margin-bottom:8px; }
|
||||
H6 { color:#666666; font-family:'Times New Roman' 'MS P明朝' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#F8F8FF; margin-bottom:8px; }
|
||||
|
||||
SPAN.good { color:#006666; font-weight:bold; }
|
||||
SPAN.critical { color:#880000; font-weight:bold; }
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>Test Report</H1>
|
||||
<xsl:apply-templates select="/TestRun/*"/>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="FailedTests">
|
||||
<H2>FailedTests</H2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="FailedTest">
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH>id</TH>
|
||||
<TH>Name</TH>
|
||||
<TH>FailureType</TH>
|
||||
<TH>Location</TH>
|
||||
<TH>Message</TH>
|
||||
</TR>
|
||||
<xsl:apply-templates select="FailedTest"/>
|
||||
</TABLE>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<SPAN class="good">No failed test.</SPAN>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="FailedTest">
|
||||
<TR>
|
||||
<TD align="right" valign='top'><xsl:value-of select="@id"/></TD>
|
||||
<TD valign='top'><xsl:apply-templates select="Name"/></TD>
|
||||
<TD valign='top'><xsl:apply-templates select="FailureType"/></TD>
|
||||
<TD valign='top'><xsl:apply-templates select="Location"/></TD>
|
||||
<TD valign='top'><pre><xsl:apply-templates select="Message"/></pre></TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
<xsl:template match="Name|FailureType|Message"><xsl:value-of select="."/></xsl:template>
|
||||
<xsl:template match="Location">
|
||||
<xsl:if test=".">
|
||||
line #<xsl:value-of select="Line"/> in <xsl:value-of select="File"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="SuccessfulTests">
|
||||
<H2>SuccessfulTests</H2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Test">
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH>id</TH>
|
||||
<TH>Name</TH>
|
||||
</TR>
|
||||
<xsl:apply-templates select="Test"/>
|
||||
</TABLE>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<SPAN class="critical">No sucessful test.</SPAN>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Test">
|
||||
<TR>
|
||||
<TD align="right"><xsl:value-of select="@id"/></TD>
|
||||
<TD><xsl:apply-templates select="Name"/></TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Statistics">
|
||||
<H2>Statistics</H2>
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH>Status</TH>
|
||||
<TH>Number</TH>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>Tests</TD>
|
||||
<TD align="right"><xsl:value-of select="Tests"/></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>FailuresTotal</TD>
|
||||
<TD align="right"><xsl:value-of select="FailuresTotal"/></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>Errors</TD>
|
||||
<TD align="right"><xsl:value-of select="Errors"/></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>Failures</TD>
|
||||
<TD align="right"><xsl:value-of select="Failures"/></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
58
contrib/xml-xsl/tests.xml
Normal file
58
contrib/xml-xsl/tests.xml
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?>
|
||||
<?xml-stylesheet type="text/xsl" href="report.xsl"?>
|
||||
<TestRun>
|
||||
<FailedTests>
|
||||
<FailedTest id="1">
|
||||
<Name>ExampleTestCase.example</Name>
|
||||
<FailureType>Assertion</FailureType>
|
||||
<Location>
|
||||
<File>exampletestcase.cpp</File>
|
||||
<Line>7</Line>
|
||||
</Location>
|
||||
<Message>- Expected : { 0; 7; 8; 9; 10; 11; 1; 2; 3; 4; 5; 6; 12; 13; 14; 15; 16; 17; 18; 19 }
|
||||
- Actual : { 0; 1; 2; 3; 4; 5; 7; 8; 9; 10; 11; 6; 12; 13; 14; 15; 16; 17; 18; 19 }
|
||||
- Difference at index 1
|
||||
->Expected : { 7; 8; 9; 10; 11; 1; 2; 3; 4; 5; 6; 12; 13; 14; 15; 16; 17; 18; 19 }
|
||||
->Actual : { 1; 2; 3; 4; 5; 7; 8; 9; 10; 11; 6; 12; 13; 14; 15; 16; 17; 18; 19 }</Message>
|
||||
</FailedTest>
|
||||
<FailedTest id="2">
|
||||
<Name>ExampleTestCase.anotherExample</Name>
|
||||
<FailureType>Assertion</FailureType>
|
||||
<Location>
|
||||
<File>exampletestcase.cpp</File>
|
||||
<Line>15</Line>
|
||||
</Location>
|
||||
<Message>1 == 2</Message>
|
||||
</FailedTest>
|
||||
<FailedTest id="3">
|
||||
<Name>ExampleTestCase.testAdd</Name>
|
||||
<FailureType>Assertion</FailureType>
|
||||
<Location>
|
||||
<File>exampletestcase.cpp</File>
|
||||
<Line>27</Line>
|
||||
</Location>
|
||||
<Message>result == 6.0</Message>
|
||||
</FailedTest>
|
||||
<FailedTest id="4">
|
||||
<Name>ExampleTestCase.testDivideByZero</Name>
|
||||
<FailureType>Error</FailureType>
|
||||
<Message>caught unknown exception</Message>
|
||||
</FailedTest>
|
||||
<FailedTest id="5">
|
||||
<Name>ExampleTestCase.testEquals</Name>
|
||||
<FailureType>Assertion</FailureType>
|
||||
<Location>
|
||||
<File>exampletestcase.cpp</File>
|
||||
<Line>48</Line>
|
||||
</Location>
|
||||
<Message>Expected: 12, but was: 13.</Message>
|
||||
</FailedTest>
|
||||
</FailedTests>
|
||||
<SuccessfulTests></SuccessfulTests>
|
||||
<Statistics>
|
||||
<Tests>5</Tests>
|
||||
<FailuresTotal>5</FailuresTotal>
|
||||
<Errors>1</Errors>
|
||||
<Failures>4</Failures>
|
||||
</Statistics>
|
||||
</TestRun>
|
67
cppunit-config.1
Normal file
67
cppunit-config.1
Normal file
@ -0,0 +1,67 @@
|
||||
.TH cppunit 1 "September 2001"
|
||||
.SH NAME
|
||||
cppunit-config - script to get information about the installed version of cppunit
|
||||
.SH SYNOPSIS
|
||||
.B cppunit-config
|
||||
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fIcppunit-config\fP is a tool that is used to configure to determine
|
||||
the compiler and linker flags that should be used to compile and link
|
||||
programs that use \fIcppunit\fP. It is also used internally to the .m4
|
||||
macros for GNU autoconf that are included with \fIcppunit\fP.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.l
|
||||
\fIcppunit-config\fP accepts the following options:
|
||||
.TP 8
|
||||
.B \-\-version
|
||||
Print the currently installed version of \fIcppunit\fP on the standard
|
||||
output.
|
||||
.TP 8
|
||||
.B \-\-libs
|
||||
Print the linker flags that are necessary to link a \fIcppunit\fP
|
||||
program.
|
||||
.TP 8
|
||||
.B \-\-cflags
|
||||
Print the compiler flags that are necessary to compile a \fIcppunit\fP
|
||||
program.
|
||||
.TP 8
|
||||
.B \-\-prefix
|
||||
Print the prefix with which \fIcppunit\fP was compiled.
|
||||
.TP 8
|
||||
.B \-\-prefix=PREFIX
|
||||
If specified, use PREFIX instead of the installation prefix that
|
||||
\fIcppunit\fP was built with when computing the output for the
|
||||
\-\-cflags and \-\-libs options. This option is also used for the exec
|
||||
prefix if \-\-exec\-prefix was not specified. This option must be
|
||||
specified before any \-\-libs or \-\-cflags options.
|
||||
.TP 8
|
||||
.B \-\-exec\-prefix
|
||||
Print the exec\-prefix with which \fIcppunit\fP was compiled.
|
||||
.TP 8
|
||||
.B \-\-exec\-prefix=PREFIX
|
||||
If specified, use PREFIX instead of the installation exec prefix that
|
||||
\fIcppunit\fP was built with when computing the output for the
|
||||
\-\-cflags and \-\-libs options. This option must be specified before
|
||||
any \-\-libs or \-\-cflags options.
|
||||
.SH COPYRIGHT
|
||||
cppunit Copyright \(co 1996-2000 by Michael Feathers <mfeathers@objectmentor.com>
|
||||
.PP
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or (at
|
||||
your option) any later version.
|
||||
.PP
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
.PP
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
.SH AUTHOR
|
||||
This manpage is an almost word-for-word copy of the gtk-config
|
||||
manpage, written by Owen Taylor. It was modified by E. Sommerlade
|
||||
<eric@sommerla.de>.
|
98
cppunit-config.in
Normal file
98
cppunit-config.in
Normal file
@ -0,0 +1,98 @@
|
||||
#!/bin/sh
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
exec_prefix_set=no
|
||||
includedir=@includedir@
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: cppunit-config [OPTION] ...
|
||||
|
||||
Generic options
|
||||
--version output CppUnit version information.
|
||||
--help display this help and exit.
|
||||
|
||||
Compilation support options
|
||||
--cflags print pre-processor and compiler flags
|
||||
--libs print library linking information
|
||||
|
||||
Install directories CppUnit was configured to
|
||||
--prefix[=DIR]
|
||||
--exec-prefix[=DIR]
|
||||
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage 1 1>&2
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
if test $exec_prefix_set = no ; then
|
||||
exec_prefix=$optarg
|
||||
fi
|
||||
;;
|
||||
--prefix)
|
||||
echo_prefix=yes
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
exec_prefix_set=yes
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo_exec_prefix=yes
|
||||
;;
|
||||
--version)
|
||||
echo @CPPUNIT_VERSION@
|
||||
;;
|
||||
--help)
|
||||
usage 0
|
||||
;;
|
||||
--cflags)
|
||||
echo_cflags=yes
|
||||
;;
|
||||
--libs)
|
||||
echo_libs=yes
|
||||
;;
|
||||
*)
|
||||
usage 1 1>&2
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test "$echo_prefix" = "yes"; then
|
||||
echo $prefix
|
||||
fi
|
||||
|
||||
if test "$echo_exec_prefix" = "yes"; then
|
||||
echo $exec_prefix
|
||||
fi
|
||||
|
||||
if test "$echo_cflags" = "yes"; then
|
||||
if test "$includedir" != "/usr/include" ; then
|
||||
echo -I$includedir
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$echo_libs" = "yes"; then
|
||||
if test @libdir@ != /usr/lib ; then
|
||||
my_linker_flags="-L@libdir@"
|
||||
fi
|
||||
echo ${my_linker_flags} -lcppunit @LIBADD_DL@
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
92
cppunit.m4
Normal file
92
cppunit.m4
Normal file
@ -0,0 +1,92 @@
|
||||
dnl
|
||||
dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_CPPUNIT],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)],
|
||||
cppunit_config_prefix="$withval", cppunit_config_prefix="")
|
||||
AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)],
|
||||
cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="")
|
||||
|
||||
if test x$cppunit_config_exec_prefix != x ; then
|
||||
cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
|
||||
if test x${CPPUNIT_CONFIG+set} != xset ; then
|
||||
CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
|
||||
fi
|
||||
fi
|
||||
if test x$cppunit_config_prefix != x ; then
|
||||
cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
|
||||
if test x${CPPUNIT_CONFIG+set} != xset ; then
|
||||
CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
|
||||
cppunit_version_min=$1
|
||||
|
||||
AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min)
|
||||
no_cppunit=""
|
||||
if test "$CPPUNIT_CONFIG" = "no" ; then
|
||||
AC_MSG_RESULT(no)
|
||||
no_cppunit=yes
|
||||
else
|
||||
CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
|
||||
CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
|
||||
cppunit_version=`$CPPUNIT_CONFIG --version`
|
||||
|
||||
cppunit_major_version=`echo $cppunit_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
cppunit_minor_version=`echo $cppunit_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
cppunit_micro_version=`echo $cppunit_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
|
||||
cppunit_major_min=`echo $cppunit_version_min | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
if test "x${cppunit_major_min}" = "x" ; then
|
||||
cppunit_major_min=0
|
||||
fi
|
||||
|
||||
cppunit_minor_min=`echo $cppunit_version_min | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
if test "x${cppunit_minor_min}" = "x" ; then
|
||||
cppunit_minor_min=0
|
||||
fi
|
||||
|
||||
cppunit_micro_min=`echo $cppunit_version_min | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x${cppunit_micro_min}" = "x" ; then
|
||||
cppunit_micro_min=0
|
||||
fi
|
||||
|
||||
cppunit_version_proper=`expr \
|
||||
$cppunit_major_version \> $cppunit_major_min \| \
|
||||
$cppunit_major_version \= $cppunit_major_min \& \
|
||||
$cppunit_minor_version \> $cppunit_minor_min \| \
|
||||
$cppunit_major_version \= $cppunit_major_min \& \
|
||||
$cppunit_minor_version \= $cppunit_minor_min \& \
|
||||
$cppunit_micro_version \>= $cppunit_micro_min `
|
||||
|
||||
if test "$cppunit_version_proper" = "1" ; then
|
||||
AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
no_cppunit=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$no_cppunit" = x ; then
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
CPPUNIT_CFLAGS=""
|
||||
CPPUNIT_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
|
||||
AC_SUBST(CPPUNIT_CFLAGS)
|
||||
AC_SUBST(CPPUNIT_LIBS)
|
||||
])
|
||||
|
||||
|
||||
|
11
cppunit.pc.in
Normal file
11
cppunit.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: CppUnit
|
||||
Description: The C++ Unit Test Library
|
||||
Version: @CPPUNIT_VERSION@
|
||||
Libs: -L${libdir} -lcppunit
|
||||
Libs.private: @LIBADD_DL@
|
||||
Cflags: -I${includedir}
|
65
cppunit.spec
Normal file
65
cppunit.spec
Normal file
@ -0,0 +1,65 @@
|
||||
Name: cppunit
|
||||
Version: 1.12.1
|
||||
Release: 2
|
||||
|
||||
Summary: C++ Port of JUnit Testing Framework
|
||||
License: LGPL
|
||||
Group: Development/Libraries
|
||||
Url: http://cppunit.sourceforge.net/
|
||||
Source: ftp://download.sourceforge.net/pub/sourceforge/cppunit/cppunit-%version.tar.gz
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
CppUnit is the C++ port of the famous JUnit framework for unit testing.
|
||||
Test output is in XML for automatic testing and GUI based for supervised tests.
|
||||
|
||||
%package doc
|
||||
Summary: HTML formatted API documention for Log for C++
|
||||
Group: Development/Libraries
|
||||
Requires: %name = %version
|
||||
|
||||
%description doc
|
||||
The %name-doc package contains HTML formatted API documention generated by
|
||||
the popular doxygen documentation generation tool.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure --enable-doxygen
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
|
||||
rm -rf $RPM_BUILD_ROOT/%{_datadir}/cppunit
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/cppunit-config
|
||||
%{_bindir}/DllPlugInTester
|
||||
%{_includedir}/cppunit/*
|
||||
%{_mandir}/man1/*
|
||||
%{_datadir}/aclocal/*
|
||||
%{_libdir}/libcppunit*.so.*
|
||||
%{_libdir}/libcppunit.so
|
||||
%{_libdir}/libcppunit.a
|
||||
%doc AUTHORS COPYING INSTALL NEWS README THANKS ChangeLog TODO BUGS doc/FAQ
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files doc
|
||||
%doc doc/html/*
|
||||
|
||||
%changelog
|
||||
* Mon Jul 4 2005 Patrice Dumas <dumas@centre-cired.fr>
|
||||
- update using the fedora template
|
||||
* Sat Apr 14 2001 Bastiaan Bakker <bastiaan.bakker@lifeline.nl>
|
||||
- Initial release
|
65
cppunit.spec.in
Normal file
65
cppunit.spec.in
Normal file
@ -0,0 +1,65 @@
|
||||
Name: cppunit
|
||||
Version: @VERSION@
|
||||
Release: 2
|
||||
|
||||
Summary: C++ Port of JUnit Testing Framework
|
||||
License: LGPL
|
||||
Group: Development/Libraries
|
||||
Url: http://cppunit.sourceforge.net/
|
||||
Source: ftp://download.sourceforge.net/pub/sourceforge/cppunit/cppunit-%version.tar.gz
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
CppUnit is the C++ port of the famous JUnit framework for unit testing.
|
||||
Test output is in XML for automatic testing and GUI based for supervised tests.
|
||||
|
||||
%package doc
|
||||
Summary: HTML formatted API documention for Log for C++
|
||||
Group: Development/Libraries
|
||||
Requires: %name = %version
|
||||
|
||||
%description doc
|
||||
The %name-doc package contains HTML formatted API documention generated by
|
||||
the popular doxygen documentation generation tool.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure --enable-doxygen
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
|
||||
rm -rf $RPM_BUILD_ROOT/%{_datadir}/cppunit
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/cppunit-config
|
||||
%{_bindir}/DllPlugInTester
|
||||
%{_includedir}/cppunit/*
|
||||
%{_mandir}/man1/*
|
||||
%{_datadir}/aclocal/*
|
||||
%{_libdir}/libcppunit*.so.*
|
||||
%{_libdir}/libcppunit.so
|
||||
%{_libdir}/libcppunit.a
|
||||
%doc AUTHORS COPYING INSTALL NEWS README THANKS ChangeLog TODO BUGS doc/FAQ
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files doc
|
||||
%doc doc/html/*
|
||||
|
||||
%changelog
|
||||
* Mon Jul 4 2005 Patrice Dumas <dumas@centre-cired.fr>
|
||||
- update using the fedora template
|
||||
* Sat Apr 14 2001 Bastiaan Bakker <bastiaan.bakker@lifeline.nl>
|
||||
- Initial release
|
604
doc/Doxyfile.in
Normal file
604
doc/Doxyfile.in
Normal file
@ -0,0 +1,604 @@
|
||||
# Doxyfile 1.1.4
|
||||
|
||||
# This file describes the settings to be used by doxygen for a project
|
||||
#
|
||||
# All text after a hash (#) is considered a comment and will be ignored
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (" ")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||
# by quotes) that should identify the project.
|
||||
|
||||
PROJECT_NAME = CppUnit
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = "Version @VERSION@"
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = .
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# The default language is English, other supported languages are:
|
||||
# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese,
|
||||
# Spanish and Russian
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
||||
# top of each HTML page. The value NO (the default) enables the index and
|
||||
# the value YES disables it.
|
||||
|
||||
DISABLE_INDEX = NO
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES all classes and functions will be
|
||||
# included in the documentation, even if no documentation was available.
|
||||
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_PRIVATE = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||
# undocumented members inside documented classes or files.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSESS tag is set to YES, Doxygen will hide all
|
||||
# undocumented classes.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
# the file and class documentation (similar to JavaDoc).
|
||||
# Set to NO to disable this.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
|
||||
# the brief description of a member or function before the detailed description.
|
||||
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
# brief descriptions will be completely suppressed.
|
||||
|
||||
REPEAT_BRIEF = YES
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# Doxygen will generate a detailed section even if there is only a brief
|
||||
# description.
|
||||
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
|
||||
# path before files name in the file list and in the header files. If set
|
||||
# to NO the shortest path that makes the file name unique will be used.
|
||||
|
||||
FULL_PATH_NAMES = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
|
||||
# can be used to strip a user defined part of the path. Stripping is
|
||||
# only done if one of the specified strings matches the left-hand part of
|
||||
# the path.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The INTERNAL_DOCS tag determines if documentation
|
||||
# that is typed after a \internal command is included. If the tag is set
|
||||
# to NO (the default) then the documentation will be excluded.
|
||||
# Set it to YES to include the internal documentation.
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
|
||||
# generate a class diagram (in Html and LaTeX) for classes with base or
|
||||
# super classes. Setting the tag to NO turns the diagrams off.
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
|
||||
# be generated. Documented entities will be cross-referenced with these sources.
|
||||
|
||||
SOURCE_BROWSER = NO
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||
# of functions and classes directly in the documentation.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||
# doxygen to hide any special comment blocks from generated source code
|
||||
# fragments. Normal C and C++ comments will always remain visible.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen
|
||||
# will only generate file names in lower case letters. If set to
|
||||
# YES upper case letters are also allowed. This is useful if you have
|
||||
# classes or files whose names only differ in case and if your file system
|
||||
# supports case sensitive file names.
|
||||
|
||||
CASE_SENSE_NAMES = NO
|
||||
|
||||
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
|
||||
# will generate a verbatim copy of the header file for each class for
|
||||
# which an include is specified. Set to NO to disable this.
|
||||
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
|
||||
# will put list of the files that are included by a file in the documentation
|
||||
# of that file.
|
||||
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen
|
||||
# will interpret the first line (until the first dot) of a JavaDoc-style
|
||||
# comment as the brief description. If set to NO, the Javadoc-style will
|
||||
# behave just like the Qt-style comments.
|
||||
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||
# member inherits the documentation from any documented member that it
|
||||
# reimplements.
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||
# is inserted in the documentation for inline members.
|
||||
|
||||
INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
|
||||
# will sort the (detailed) documentation of file and class members
|
||||
# alphabetically by member name. If set to NO the members will appear in
|
||||
# declaration order.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
||||
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
||||
|
||||
TAB_SIZE = 8
|
||||
|
||||
# The ENABLE_SECTIONS tag can be used to enable conditional
|
||||
# documentation sections, marked by \if sectionname ... \endif.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
QUIET = NO
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||
# NO is used.
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
|
||||
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
|
||||
# automatically be disabled.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that
|
||||
# doxygen can produce. The string should contain the $file, $line, and $text
|
||||
# tags, which will be replaced by the file and line number from which the
|
||||
# warning originated and the warning text.
|
||||
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The INPUT tag can be used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like "myfile.cpp" or
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = @top_srcdir@/include @top_srcdir@/src/cppunit @srcdir@/other_documentation.dox @srcdir@/cookbook.dox @srcdir@/Money.dox
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
FILE_PATTERNS = *.cpp *.h
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
# If left blank NO is used.
|
||||
|
||||
RECURSIVE = YES
|
||||
|
||||
# The EXCLUDE tag can be used to specify files and/or directories that should
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE =
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
# certain files from those directories.
|
||||
|
||||
EXCLUDE_PATTERNS = config-*.h
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
||||
EXAMPLE_PATH = ../examples
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
EXAMPLE_PATTERNS = *.cpp *.h
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain image that are included in the documentation (see
|
||||
# the \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
||||
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
||||
# input file. Doxygen will then use the output that the filter program writes
|
||||
# to standard output.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
|
||||
# of all compounds will be generated. Enable this if the project
|
||||
# contains a lot of classes, structs, unions or interfaces.
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
# in which this list will be split (can be a number in the range [1..20])
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all
|
||||
# classes will be put under the same header in the alphabetical index.
|
||||
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
|
||||
# should be ignored while generating the index headers.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||
# generate HTML output.
|
||||
|
||||
GENERATE_HTML = @enable_html_docs@
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `html' will be used as the default path.
|
||||
|
||||
HTML_OUTPUT = html
|
||||
|
||||
# The HTML_HEADER tag can be used to specify a personal HTML header for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard header.
|
||||
|
||||
HTML_HEADER = @srcdir@/header.html
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
HTML_FOOTER = @srcdir@/footer.html
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
# fine-tune the look of the HTML output. If the tag is left blank doxygen
|
||||
# will generate a default style sheet
|
||||
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
# NO a bullet list will be used.
|
||||
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for tools like the
|
||||
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
|
||||
# of the generated HTML documentation.
|
||||
|
||||
GENERATE_HTMLHELP = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
GENERATE_LATEX = @enable_latex_docs@
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `latex' will be used as the default path.
|
||||
|
||||
LATEX_OUTPUT = latex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
|
||||
# LaTeX documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used
|
||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||
# executive. If left blank a4wide will be used.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||
# packages that should be included in the LaTeX output.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
|
||||
# the generated latex document. The header should contain everything until
|
||||
# the first chapter. If it is left blank doxygen will generate a
|
||||
# standard header. Notice: only use this tag if you know what you are doing!
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
|
||||
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
|
||||
# contain links (just like the HTML output) instead of page references
|
||||
# This makes the output suitable for online browsing using a pdf viewer.
|
||||
|
||||
PDF_HYPERLINKS = NO
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep
|
||||
# running if errors occur, instead of asking the user for help.
|
||||
# This option is also used when generating formulas in HTML.
|
||||
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
|
||||
# For now this is experimental and is disabled by default. The RTF output
|
||||
# is optimised for Word 97 and may not look too pretty with other readers
|
||||
# or editors.
|
||||
|
||||
GENERATE_RTF = NO
|
||||
|
||||
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `rtf' will be used as the default path.
|
||||
|
||||
RTF_OUTPUT = rtf
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
|
||||
# RTF documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_RTF = NO
|
||||
|
||||
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
|
||||
# will contain hyperlink fields. The RTF file will
|
||||
# contain links (just like the HTML output) instead of page references.
|
||||
# This makes the output suitable for online browsing using a WORD or other.
|
||||
# programs which support those fields.
|
||||
# Note: wordpad (write) and others do not support links.
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
|
||||
# generate man pages
|
||||
|
||||
GENERATE_MAN = NO
|
||||
|
||||
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `man' will be used as the default path.
|
||||
|
||||
MAN_OUTPUT = man
|
||||
|
||||
# The MAN_EXTENSION tag determines the extension that is added to
|
||||
# the generated man pages (default is the subroutine's section .3)
|
||||
|
||||
MAN_EXTENSION = .3
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
|
||||
# evaluate all C-preprocessor directives found in the sources and include
|
||||
# files.
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
|
||||
# names in the source code. If set to NO (the default) only conditional
|
||||
# compilation will be performed.
|
||||
|
||||
MACRO_EXPANSION = NO
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
|
||||
# in the INCLUDE_PATH (see below) will be search if a #include is found.
|
||||
|
||||
SEARCH_INCLUDES = YES
|
||||
|
||||
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||
# contain include files that are not input files but should be processed by
|
||||
# the preprocessor.
|
||||
|
||||
INCLUDE_PATH =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that
|
||||
# are defined before the preprocessor is started (similar to the -D option of
|
||||
# gcc). The argument of the tag is a list of macros of the form: name
|
||||
# or name=definition (no spaces). If the definition and the = are
|
||||
# omitted =1 is assumed.
|
||||
|
||||
PREDEFINED = CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION \
|
||||
CPPUNIT_HAVE_NAMESPACES=1 \
|
||||
CPPUNIT_NS_BEGIN="namespace CppUnit {" \
|
||||
CPPUNIT_NS_END=} \
|
||||
CPPUNIT_NS=CppUnit
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||
# then the macro expansion is limited to the macros specified with the
|
||||
# PREDEFINED tag.
|
||||
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The TAGFILES tag can be used to specify one or more tagfiles.
|
||||
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||
# a tag file that is based on the input files it reads.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
|
||||
# in the class index. If set to NO only the inherited external classes
|
||||
# will be listed.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of `which perl').
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||
# available from the path. This tool is part of Graphviz, a graph visualization
|
||||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||
# have no effect if this option is set to NO (the default)
|
||||
|
||||
HAVE_DOT = @enable_dot@
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect inheritance relations. Setting this tag to YES will force the
|
||||
# the CLASS_DIAGRAMS tag to NO.
|
||||
|
||||
CLASS_GRAPH = YES
|
||||
|
||||
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect implementation dependencies (inheritance, containment, and
|
||||
# class references variables) of the class with other documented classes.
|
||||
|
||||
COLLABORATION_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to
|
||||
# YES then doxygen will generate a graph for each documented file showing
|
||||
# the direct and indirect include dependencies of the file with other
|
||||
# documented files.
|
||||
|
||||
INCLUDE_GRAPH = YES
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
||||
# will graphical hierarchy of all classes instead of a textual one.
|
||||
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
|
||||
# This tag can be used to specify the path where the dot tool can be found.
|
||||
# If left blank, it is assumed the dot tool can be found on the path.
|
||||
|
||||
DOT_PATH =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The SEARCHENGINE tag specifies whether or not a search engine should be
|
||||
# used. If set to NO the values of all tags below this one will be ignored.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
|
||||
# The CGI_NAME tag should be the name of the CGI script that
|
||||
# starts the search engine (doxysearch) with the correct parameters.
|
||||
# A script with this name will be generated by doxygen.
|
||||
|
||||
CGI_NAME = search.cgi
|
||||
|
||||
# The CGI_URL tag should be the absolute URL to the directory where the
|
||||
# cgi binaries are located. See the documentation of your http daemon for
|
||||
# details.
|
||||
|
||||
CGI_URL =
|
||||
|
||||
# The DOC_URL tag should be the absolute URL to the directory where the
|
||||
# documentation is located. If left blank the absolute path to the
|
||||
# documentation, with file:// prepended to it, will be used.
|
||||
|
||||
DOC_URL =
|
||||
|
||||
# The DOC_ABSPATH tag should be the absolute path to the directory where the
|
||||
# documentation is located. If left blank the directory on the local machine
|
||||
# will be used.
|
||||
|
||||
DOC_ABSPATH =
|
||||
|
||||
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
|
||||
# is installed.
|
||||
|
||||
BIN_ABSPATH = /usr/local/bin/
|
||||
|
||||
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
|
||||
# documentation generated for other projects. This allows doxysearch to search
|
||||
# the documentation for these projects as well.
|
||||
|
||||
EXT_DOC_PATHS =
|
31
doc/FAQ
Normal file
31
doc/FAQ
Normal file
@ -0,0 +1,31 @@
|
||||
Frequently Asked Questions:
|
||||
---------------------------
|
||||
|
||||
1) Questions relating to CppUnit
|
||||
----------------------------
|
||||
|
||||
1.1) Isn't there an easier way to write unit tests than using TestCaller ?
|
||||
|
||||
Yes, there is. Macros have been created to take care of the repetitive
|
||||
work. Look up include/extensions/HelperMacros.h in CppUnit documentation.
|
||||
Most of CppUnit test suite is also written that way since they remain
|
||||
compatible as CppUnit evolve. They also use RTTI if available.
|
||||
|
||||
|
||||
2) Questions related to Microsoft Visual VC++
|
||||
-----------------------------------------
|
||||
|
||||
2.1) Why does the compiler report an error when linking with CppUnit library?
|
||||
|
||||
You most likely are not using the same C-RunTime library as CppUnit.
|
||||
In Release configuration, CppUnit use "Mulithreaded DLL".
|
||||
In Debug configurations, CppUnit use "Debug Multihreaded DLL".
|
||||
Check that Projects/Settings.../C++/Code Generation is indeed using
|
||||
the correct library.
|
||||
|
||||
2.2) Why does CppUnit generate warning 4786:... when compiling ?
|
||||
|
||||
I really don't have a clue. All CppUnit's headers starts by either
|
||||
including Portability.h or another CppUnit's header. Portability.h includes
|
||||
config-msvc6.h which disable that specific warning. The warning is generated
|
||||
by TestFactoryRegistry::m_factories. A solution to this problem is welcome.
|
67
doc/Makefile.am
Normal file
67
doc/Makefile.am
Normal file
@ -0,0 +1,67 @@
|
||||
EXTRA_DIST = $(doxygen_input) $(static_pages)
|
||||
|
||||
doxygen_input = cookbook.dox other_documentation.dox header.html footer.html Money.dox
|
||||
static_pages = FAQ
|
||||
|
||||
|
||||
# DOC is defined if installer requests doc generation.
|
||||
# For now, we only install HTML documentation. We could install manpages
|
||||
# using the following
|
||||
# man_MANS = man/man3/CppUnit.3
|
||||
# man/man3/CppUnit.3: dox
|
||||
# and an extra copy or two in the install-data-hook.
|
||||
# However, the manpages do not appear to be tremendously useful, so
|
||||
# let's not bother.
|
||||
|
||||
if DOC
|
||||
|
||||
htmldir = $(pkgdatadir)/html
|
||||
html_DATA = $(static_pages) html/index.html
|
||||
|
||||
install-data-hook:
|
||||
cp -pR html/* $(DESTDIR)$(htmldir)
|
||||
|
||||
# Automake's "distcheck" is sensitive to having files left over
|
||||
# after "make uninstall", so we have to clean up the install hook.
|
||||
uninstall-local:
|
||||
rm -rf $(DESTDIR)$(htmldir)
|
||||
|
||||
dox: html/index.html
|
||||
|
||||
else
|
||||
|
||||
# We repeat the three targets in both the "if" and "else" clauses
|
||||
# of the conditional, because the generated makefile will contain
|
||||
# references to the targets (target "install" depends on target
|
||||
# "install-datahook", for example), and some make programs get upset
|
||||
# if no target exists.
|
||||
|
||||
install-data-hook:
|
||||
uninstall-local:
|
||||
dox:
|
||||
|
||||
endif
|
||||
|
||||
|
||||
all-local: dox
|
||||
|
||||
|
||||
html/index.html: Doxyfile $(doxygen_input)
|
||||
"@DOXYGEN@"
|
||||
|
||||
|
||||
# Make tarfile to distribute the HTML documentation.
|
||||
doc-dist: dox
|
||||
cp $(static_pages) html
|
||||
tar -czf $(PACKAGE)-docs-$(VERSION).tar.gz -C html .
|
||||
|
||||
pdf: @PACKAGE@.pdf
|
||||
@PACKAGE@.pdf:
|
||||
$(MAKE) -C ./latex pdf
|
||||
ln -s ./latex/refman.ps @PACKAGE@.ps
|
||||
ln -s ./latex/refman.pdf @PACKAGE@.pdf
|
||||
|
||||
|
||||
clean-local:
|
||||
$(RM) -r latex
|
||||
$(RM) -r html man @PACKAGE@.ps @PACKAGE@.pdf
|
441
doc/Makefile.in
Normal file
441
doc/Makefile.in
Normal file
@ -0,0 +1,441 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/ac_create_prefix_config_h.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_sstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_strstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_namespaces.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_rtti.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_string_compare_string_first.m4 \
|
||||
$(top_srcdir)/config/ac_dll.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_gcc_abi_demangle.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_have_isfinite.m4 \
|
||||
$(top_srcdir)/config/bb_enable_doxygen.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES = Doxyfile
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(htmldir)"
|
||||
htmlDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(html_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPPUNIT_BINARY_AGE = @CPPUNIT_BINARY_AGE@
|
||||
CPPUNIT_INTERFACE_AGE = @CPPUNIT_INTERFACE_AGE@
|
||||
CPPUNIT_MAJOR_VERSION = @CPPUNIT_MAJOR_VERSION@
|
||||
CPPUNIT_MICRO_VERSION = @CPPUNIT_MICRO_VERSION@
|
||||
CPPUNIT_MINOR_VERSION = @CPPUNIT_MINOR_VERSION@
|
||||
CPPUNIT_VERSION = @CPPUNIT_VERSION@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOT = @DOT@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
enable_dot = @enable_dot@
|
||||
enable_html_docs = @enable_html_docs@
|
||||
enable_latex_docs = @enable_latex_docs@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
|
||||
# DOC is defined if installer requests doc generation.
|
||||
# For now, we only install HTML documentation. We could install manpages
|
||||
# using the following
|
||||
# man_MANS = man/man3/CppUnit.3
|
||||
# man/man3/CppUnit.3: dox
|
||||
# and an extra copy or two in the install-data-hook.
|
||||
# However, the manpages do not appear to be tremendously useful, so
|
||||
# let's not bother.
|
||||
@DOC_TRUE@htmldir = $(pkgdatadir)/html
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = $(doxygen_input) $(static_pages)
|
||||
doxygen_input = cookbook.dox other_documentation.dox header.html footer.html Money.dox
|
||||
static_pages = FAQ
|
||||
@DOC_TRUE@html_DATA = $(static_pages) html/index.html
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-htmlDATA: $(html_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
|
||||
@list='$(html_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(htmlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(htmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-htmlDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(html_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA) all-local
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(htmldir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-htmlDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-htmlDATA uninstall-local
|
||||
|
||||
.MAKE: install-am install-data-am install-strip
|
||||
|
||||
.PHONY: all all-am all-local check check-am clean clean-generic \
|
||||
clean-libtool clean-local distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-data-hook install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-htmlDATA \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-htmlDATA uninstall-local
|
||||
|
||||
|
||||
@DOC_TRUE@install-data-hook:
|
||||
@DOC_TRUE@ cp -pR html/* $(DESTDIR)$(htmldir)
|
||||
|
||||
# Automake's "distcheck" is sensitive to having files left over
|
||||
# after "make uninstall", so we have to clean up the install hook.
|
||||
@DOC_TRUE@uninstall-local:
|
||||
@DOC_TRUE@ rm -rf $(DESTDIR)$(htmldir)
|
||||
|
||||
@DOC_TRUE@dox: html/index.html
|
||||
|
||||
# We repeat the three targets in both the "if" and "else" clauses
|
||||
# of the conditional, because the generated makefile will contain
|
||||
# references to the targets (target "install" depends on target
|
||||
# "install-datahook", for example), and some make programs get upset
|
||||
# if no target exists.
|
||||
|
||||
@DOC_FALSE@install-data-hook:
|
||||
@DOC_FALSE@uninstall-local:
|
||||
@DOC_FALSE@dox:
|
||||
|
||||
all-local: dox
|
||||
|
||||
html/index.html: Doxyfile $(doxygen_input)
|
||||
"@DOXYGEN@"
|
||||
|
||||
# Make tarfile to distribute the HTML documentation.
|
||||
doc-dist: dox
|
||||
cp $(static_pages) html
|
||||
tar -czf $(PACKAGE)-docs-$(VERSION).tar.gz -C html .
|
||||
|
||||
pdf: @PACKAGE@.pdf
|
||||
@PACKAGE@.pdf:
|
||||
$(MAKE) -C ./latex pdf
|
||||
ln -s ./latex/refman.ps @PACKAGE@.ps
|
||||
ln -s ./latex/refman.pdf @PACKAGE@.pdf
|
||||
|
||||
clean-local:
|
||||
$(RM) -r latex
|
||||
$(RM) -r html man @PACKAGE@.ps @PACKAGE@.pdf
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
558
doc/Money.dox
Normal file
558
doc/Money.dox
Normal file
@ -0,0 +1,558 @@
|
||||
/*! \page money_example Money, a step by step example
|
||||
|
||||
\section Table of contents
|
||||
|
||||
- \ref sec_setting_vc
|
||||
- \ref sec_setting_unix
|
||||
- \ref sec_running_test
|
||||
- \ref sec_adding_testfixture
|
||||
- \ref sec_first_tests
|
||||
- \ref sec_more_tests
|
||||
- \ref sec_credits
|
||||
|
||||
The example explored in this article can be found in \c examples/Money/.
|
||||
|
||||
|
||||
|
||||
\section sec_setting_vc Setting up your project (VC++)
|
||||
|
||||
\subsection sec_install Compiling and installing CppUnit libaries
|
||||
|
||||
In the following document, $CPPUNIT is the directory where you unpacked %CppUnit:
|
||||
$CPPUNIT/:
|
||||
include/
|
||||
lib/
|
||||
src/
|
||||
cppunit/
|
||||
|
||||
First, you need to compile %CppUnit libraries:
|
||||
- Open the $CPPUNIT/src/CppUnitLibraries.dsw workspace in VC++.
|
||||
- In the 'Build' menu, select 'Batch Build...'
|
||||
- In the batch build dialog, select all projects and press the build button.
|
||||
- The resulting libraries can be found in the $CPPUNIT/lib/ directory.
|
||||
|
||||
Once it is done, you need to tell VC++ where are the includes and libraries
|
||||
to use them in other projects. Open the 'Tools/Options...' dialog, and in the
|
||||
'Directories' tab, select 'include files' in the combo. Add a new entry that
|
||||
points to $CPPUNIT/include/. Change to 'libraries files' in the combo and
|
||||
add a new entry for $CPPUNIT/lib/. Repeat the process with 'source files'
|
||||
and add $CPPUNIT/src/cppunit/.
|
||||
|
||||
\subsection sec_getting_started Getting started
|
||||
|
||||
Creates a new console application ('a simple application' template will do).
|
||||
Let's link %CppUnit library to our project. In the project settings:
|
||||
- In tab 'C++', combo 'Code generation', set the combo to 'Multithreaded DLL'
|
||||
for the release configuration, and 'Debug Multithreaded DLL' for the debug
|
||||
configure,
|
||||
- In tab 'C++', combo 'C++ langage', for All Configurations, check
|
||||
'enable Run-Time Type Information (RTTI)',
|
||||
- In tab 'Link', in the 'Object/library modules' field, add cppunitd.lib for
|
||||
the debug configuration, and cppunit.lib for the release configuration.
|
||||
|
||||
We're done !
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section sec_setting_unix Setting up your project (Unix)
|
||||
We'll use \c autoconf and \c automake to make it simple to
|
||||
create our build environment. Create a directory somewhere to
|
||||
hold the code we're going to build. Create \c configure.in and
|
||||
\c Makefile.am in that directory to get started.
|
||||
|
||||
<tt>configure.in</tt>
|
||||
\verbatim
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(Makefile.am)
|
||||
AM_INIT_AUTOMAKE(money,0.1)
|
||||
AM_PATH_CPPUNIT(1.9.6)
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_OUTPUT(Makefile)\endverbatim
|
||||
|
||||
<tt>Makefile.am</tt>
|
||||
\verbatim
|
||||
# Rules for the test code (use `make check` to execute)
|
||||
TESTS = MoneyApp
|
||||
check_PROGRAMS = $(TESTS)
|
||||
MoneyApp_SOURCES = Money.h MoneyTest.h MoneyTest.cpp MoneyApp.cpp
|
||||
MoneyApp_CXXFLAGS = $(CPPUNIT_CFLAGS)
|
||||
MoneyApp_LDFLAGS = $(CPPUNIT_LIBS) -ldl\endverbatim
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section sec_running_test Running our tests
|
||||
|
||||
We have a main that doesn't do anything. Let's start by adding the mechanics
|
||||
to run our tests (remember, test before you code ;-) ). For this example,
|
||||
we will use a TextTestRunner with the CompilerOutputter for post-build
|
||||
testing:
|
||||
|
||||
<tt>MoneyApp.cpp</tt>
|
||||
\code
|
||||
#include "stdafx.h"
|
||||
#include <cppunit/CompilerOutputter.h>
|
||||
#include <cppunit/extensions/TestFactoryRegistry.h>
|
||||
#include <cppunit/ui/text/TestRunner.h>
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
// Get the top level suite from the registry
|
||||
CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
|
||||
|
||||
// Adds the test to the list of test to run
|
||||
CppUnit::TextUi::TestRunner runner;
|
||||
runner.addTest( suite );
|
||||
|
||||
// Change the default outputter to a compiler error format outputter
|
||||
runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
|
||||
std::cerr ) );
|
||||
// Run the tests.
|
||||
bool wasSucessful = runner.run();
|
||||
|
||||
// Return error code 1 if the one of test failed.
|
||||
return wasSucessful ? 0 : 1;
|
||||
}\endcode
|
||||
|
||||
VC++: Compile and run (Ctrl+F5).
|
||||
|
||||
Unix: First build. Since we don't have all the file yet, let's create them
|
||||
and build our application for the first time:
|
||||
\verbatim
|
||||
touch Money.h MoneyTest.h MoneyTest.cpp
|
||||
aclocal -I /usr/local/share/aclocal
|
||||
autoconf
|
||||
automake -a
|
||||
touch NEWS README AUTHORS ChangeLog # To make automake happy
|
||||
./configure
|
||||
make check\endverbatim
|
||||
|
||||
Our application will report that everything
|
||||
is fine and no test were run. So let's add some tests...
|
||||
|
||||
|
||||
|
||||
\subsection sec_post_build Setting up automated post-build testing (VC++)
|
||||
|
||||
What does post-build testing means? It means that each time you compile,
|
||||
the test are automatically run when the build finish. This is very
|
||||
useful, if you compile often you can know that you just 'broke' something,
|
||||
or that everything is still working fine.
|
||||
|
||||
Let's adds that to our project, In the project settings, in the
|
||||
'post-build step' tab:
|
||||
- Select 'All configurations' (upper left combo)
|
||||
- In the 'Post-build description', enter 'Unit testing...'
|
||||
- In 'post-build command(s)', add a new line: <tt>\$(TargetPath)</tt>
|
||||
|
||||
<tt>\$(TargetPath)</tt> expands into the name of your application:
|
||||
Debug\\MoneyApp.exe in debug configuration and Release\\MoneyApp.exe in release
|
||||
configuration.
|
||||
|
||||
What we are doing is say to VC++ to run our application for each build.
|
||||
Notices the last line of \c main(), it returns a different error code,
|
||||
depending on weither or not a test failed. If the code returned by
|
||||
an application is not 0 in post-build step, it tell VC++ that the build
|
||||
step failed.
|
||||
|
||||
Compile. Notice that the application's output is now in the build window.
|
||||
How convenient!
|
||||
|
||||
(Unix: tips to integrate make check into various IDE?)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section sec_adding_testfixture Adding the TestFixture
|
||||
|
||||
For this example, we are going to write a simple money class. Money
|
||||
has an amount and a currency. Let's begin by creating a fixture where
|
||||
we can put our tests, and add single test to test Money constructor:
|
||||
|
||||
<tt>MoneyTest.h:</tt>
|
||||
\code
|
||||
#ifndef MONEYTEST_H
|
||||
#define MONEYTEST_H
|
||||
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
class MoneyTest : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( MoneyTest );
|
||||
CPPUNIT_TEST( testConstructor );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
void testConstructor();
|
||||
};
|
||||
|
||||
#endif // MONEYTEST_H\endcode
|
||||
|
||||
- CPPUNIT_TEST_SUITE declares that our Fixture's test suite.
|
||||
- CPPUNIT_TEST adds a test to our test suite. The test is implemented
|
||||
by a method named testConstructor().
|
||||
- setUp() and tearDown() are use to setUp/tearDown some fixtures. We are
|
||||
not using any for now.
|
||||
|
||||
<tt>MoneyTest.cpp</tt>
|
||||
\code
|
||||
#include "stdafx.h"
|
||||
#include "MoneyTest.h"
|
||||
|
||||
// Registers the fixture into the 'registry'
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION( MoneyTest );
|
||||
|
||||
|
||||
void
|
||||
MoneyTest::setUp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MoneyTest::tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MoneyTest::testConstructor()
|
||||
{
|
||||
CPPUNIT_FAIL( "not implemented" );
|
||||
}
|
||||
\endcode
|
||||
|
||||
Compile. As expected, it reports that a test failed. Press the \c F4 key
|
||||
(Go to next Error). VC++ jump right to our failed assertion CPPUNIT_FAIL.
|
||||
We can not ask better in term of integration!
|
||||
\verbatim
|
||||
Compiling...
|
||||
MoneyTest.cpp
|
||||
Linking...
|
||||
Unit testing...
|
||||
.F
|
||||
G:\prg\vc\Lib\cppunit\examples\money\MoneyTest.cpp(26):Assertion
|
||||
Test name: MoneyTest.testConstructor
|
||||
not implemented
|
||||
Failures !!!
|
||||
Run: 1 Failure total: 1 Failures: 1 Errors: 0
|
||||
Error executing d:\winnt\system32\cmd.exe.
|
||||
|
||||
moneyappd.exe - 1 error(s), 0 warning(s)
|
||||
\endverbatim
|
||||
|
||||
Well, we have everything set up, let's start doing some real testing.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section sec_first_tests Our first tests
|
||||
|
||||
Let's write our first real test. A test is usually decomposed in three parts:
|
||||
- setting up datas used by the test
|
||||
- doing some processing based on those datas
|
||||
- checking the result of the processing
|
||||
|
||||
\code
|
||||
void
|
||||
MoneyTest::testConstructor()
|
||||
{
|
||||
// Set up
|
||||
const std::string currencyFF( "FF" );
|
||||
const double longNumber = 12345678.90123;
|
||||
|
||||
// Process
|
||||
Money money( longNumber, currencyFF );
|
||||
|
||||
// Check
|
||||
CPPUNIT_ASSERT_EQUAL( longNumber, money.getAmount() );
|
||||
CPPUNIT_ASSERT_EQUAL( currencyFF, money.getCurrency() );
|
||||
}\endcode
|
||||
|
||||
Well, we finally have a good start of what our Money class will
|
||||
look like. Let's start implementing...
|
||||
|
||||
<tt>Money.h</tt>
|
||||
\code
|
||||
#ifndef MONEY_H
|
||||
#define MONEY_H
|
||||
|
||||
#include <string>
|
||||
|
||||
class Money
|
||||
{
|
||||
public:
|
||||
Money( double amount, std::string currency )
|
||||
: m_amount( amount )
|
||||
, m_currency( currency )
|
||||
{
|
||||
}
|
||||
|
||||
double getAmount() const
|
||||
{
|
||||
return m_amount;
|
||||
}
|
||||
|
||||
std::string getCurrency() const
|
||||
{
|
||||
return m_currency;
|
||||
}
|
||||
|
||||
private:
|
||||
double m_amount;
|
||||
std::string m_currency;
|
||||
};
|
||||
|
||||
#endif\endcode
|
||||
|
||||
Include <tt>Money.h</tt> in MoneyTest.cpp and compile.
|
||||
|
||||
Hum, an assertion failed! Press F4, and we jump to the assertion
|
||||
that checks the currency of the constructed money object. The report
|
||||
indicates that string is not equal to expected value. There is only
|
||||
two ways for this to happen: the member was badly initialized or we
|
||||
returned the wrong value. After a quick check, we find out it is the former.
|
||||
Let's fix that:
|
||||
|
||||
<tt>Money.h</tt>
|
||||
\code
|
||||
Money( double amount, std::string currency )
|
||||
: m_amount( amount )
|
||||
, m_currency( currency )
|
||||
{
|
||||
}\endcode
|
||||
|
||||
Compile. Our test finally pass!
|
||||
Let's add some functionnality to our Money class.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section sec_more_tests Adding more tests
|
||||
|
||||
\subsection sec_equal Testing for equality
|
||||
|
||||
We want to check if to Money object are equal. Let's start by adding
|
||||
a new test to the suite, then add our method:
|
||||
|
||||
<tt>MoneyTest.h</tt>
|
||||
\code
|
||||
CPPUNIT_TEST_SUITE( MoneyTest );
|
||||
CPPUNIT_TEST( testConstructor );
|
||||
CPPUNIT_TEST( testEqual );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
public:
|
||||
...
|
||||
void testEqual();
|
||||
\endcode
|
||||
|
||||
<tt>MoneyTest.cpp</tt>
|
||||
\code
|
||||
void
|
||||
MoneyTest::testEqual()
|
||||
{
|
||||
// Set up
|
||||
const Money money123FF( 123, "FF" );
|
||||
const Money money123USD( 123, "USD" );
|
||||
const Money money12FF( 12, "FF" );
|
||||
const Money money12USD( 12, "USD" );
|
||||
|
||||
// Process & Check
|
||||
CPPUNIT_ASSERT( money123FF == money123FF ); // ==
|
||||
CPPUNIT_ASSERT( money12FF != money123FF ); // != amount
|
||||
CPPUNIT_ASSERT( money123USD != money123FF ); // != currency
|
||||
CPPUNIT_ASSERT( money12USD != money123FF ); // != currency and != amount
|
||||
}\endcode
|
||||
|
||||
Let's implements \c operator \c == and \c operator \c != in Money.h:
|
||||
|
||||
<tt>Money.h</tt>
|
||||
\code
|
||||
class Money
|
||||
{
|
||||
public:
|
||||
...
|
||||
bool operator ==( const Money &other ) const
|
||||
{
|
||||
return m_amount == other.m_amount &&
|
||||
m_currency == other.m_currency;
|
||||
}
|
||||
|
||||
bool operator !=( const Money &other ) const
|
||||
{
|
||||
return (*this == other);
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
Compile, run... Ooops... Press F4, it seems we're having trouble
|
||||
with \c operator \c !=. Let's fix that:
|
||||
\code
|
||||
bool operator !=( const Money &other ) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}\endcode
|
||||
|
||||
Compile, run. Finally got it working!
|
||||
|
||||
|
||||
|
||||
\subsection sec_opadd Adding moneys
|
||||
|
||||
Let's add our test 'testAdd' to MoneyTest. You know the routine...
|
||||
|
||||
<tt>MoneyTest.cpp</tt>
|
||||
\code
|
||||
void
|
||||
MoneyTest::testAdd()
|
||||
{
|
||||
// Set up
|
||||
const Money money12FF( 12, "FF" );
|
||||
const Money expectedMoney( 135, "FF" );
|
||||
|
||||
// Process
|
||||
Money money( 123, "FF" );
|
||||
money += money12FF;
|
||||
|
||||
// Check
|
||||
CPPUNIT_ASSERT( expectedMoney == money ); // add works
|
||||
CPPUNIT_ASSERT( &money == &(money += money12FF) ); // add returns ref. on 'this'.
|
||||
}\endcode
|
||||
|
||||
While writing that test case, you ask yourself, what is the result of
|
||||
adding money of currencies. Obviously this is an error and it should be
|
||||
reported, say let throw an exception, say \c IncompatibleMoneyError,
|
||||
when the currencies are not equal. We will write another test case
|
||||
for this later. For now let get our testAdd() case working:
|
||||
|
||||
<tt>Money.h</tt>
|
||||
\code
|
||||
class Money
|
||||
{
|
||||
public:
|
||||
...
|
||||
Money &operator +=( const Money &other )
|
||||
{
|
||||
m_amount += other.m_amount;
|
||||
return *this;
|
||||
}
|
||||
}; \endcode
|
||||
|
||||
Compile, run. Miracle, everything is fine! Just to be sure the test is indeed
|
||||
working, in the above code, change \c m_amount \c += to \c -=. Build and
|
||||
check that it fails (always be suspicious of test that work the first
|
||||
time: you may have forgotten to add it to the suite for example)!
|
||||
Change the code back so that all the tests are working.
|
||||
|
||||
Let's the incompatible money test case before we forget about it...
|
||||
That test case expect an \c IncompatibleMoneyError exception to be thrown.
|
||||
%CppUnit can test that for us, you need to specify that the test case
|
||||
expect an exception when you add it to the suite:
|
||||
|
||||
<tt>MoneyTest.h</tt>
|
||||
\code
|
||||
class MoneyTest : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( MoneyTest );
|
||||
CPPUNIT_TEST( testConstructor );
|
||||
CPPUNIT_TEST( testEqual );
|
||||
CPPUNIT_TEST( testAdd );
|
||||
CPPUNIT_TEST_EXCEPTION( testAddThrow, IncompatibleMoneyError );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
public:
|
||||
...
|
||||
void testAddThrow();
|
||||
};\endcode
|
||||
|
||||
By convention, you end the name of such tests with \c 'Throw', that way, you
|
||||
know that the test expect an exception to be thrown. Let's write our test case:
|
||||
|
||||
<tt>MoneyTest.cpp</tt>
|
||||
\code
|
||||
void
|
||||
MoneyTest::testAddThrow()
|
||||
{
|
||||
// Set up
|
||||
const Money money123FF( 123, "FF" );
|
||||
|
||||
// Process
|
||||
Money money( 123, "USD" );
|
||||
money += money123FF; // should throw an exception
|
||||
}
|
||||
\endcode
|
||||
|
||||
Compile... Ooops, forgot to declare the exception class. Let's do that:
|
||||
|
||||
<tt>Money.h</tt>
|
||||
\code
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
class IncompatibleMoneyError : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
IncompatibleMoneyError() : runtime_error( "Incompatible moneys" )
|
||||
{
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
Compile. As expected testAddThrow() fail... Let's fix that:
|
||||
|
||||
<tt>Money.h</tt>
|
||||
\code
|
||||
Money &operator +=( const Money &other )
|
||||
{
|
||||
if ( m_currency != other.m_currency )
|
||||
throw IncompatibleMoneyError();
|
||||
|
||||
m_amount += other.m_amount;
|
||||
return *this;
|
||||
}\endcode
|
||||
|
||||
Compile. Our test finaly passes!
|
||||
|
||||
TODO:
|
||||
- How to use CPPUNIT_ASSERT_EQUALS with Money
|
||||
- Copy constructor/Assignment operator
|
||||
- Introducing fixtures
|
||||
- ?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section sec_credits Credits
|
||||
This article was written by Baptiste Lepilleur. Unix configuration & set up
|
||||
by Phil Verghese. Inspired from many others (JUnit, Phil's cookbook...),
|
||||
and all the newbies around that keep asking me for the
|
||||
'Hello world' example ;-)
|
||||
|
||||
|
||||
|
||||
*/
|
523
doc/cookbook.dox
Normal file
523
doc/cookbook.dox
Normal file
@ -0,0 +1,523 @@
|
||||
/*! \page cppunit_cookbook CppUnit Cookbook
|
||||
Here is a short cookbook to help you get started.
|
||||
|
||||
|
||||
\section simple_test_case Simple Test Case
|
||||
You want to know whether your code is working.
|
||||
|
||||
How do you do it?
|
||||
|
||||
There are many ways. Stepping through a debugger or
|
||||
littering your code with stream output calls are two of
|
||||
the simpler ways, but they both have drawbacks.
|
||||
Stepping through your code is a good idea, but it
|
||||
is not automatic. You have to do it every time you
|
||||
make changes. Streaming out text is also fine,
|
||||
but it makes code ugly and it generates far more
|
||||
information than you need most of the time.
|
||||
|
||||
Tests in %CppUnit can be run automatically.
|
||||
They are easy to set up and once you have
|
||||
written them, they are always there to help
|
||||
you keep confidence in the quality of your code.
|
||||
|
||||
To make a simple test, here is what you do:
|
||||
|
||||
Subclass the \link CppUnit::TestCase TestCase \endlink class.
|
||||
Override the method \link CppUnit::TestCase::runTest() runTest()\endlink.
|
||||
When you want to check a value, call
|
||||
\link CPPUNIT_ASSERT() CPPUNIT_ASSERT(bool) \endlink
|
||||
and pass in an expression that is true if the
|
||||
test succeeds.
|
||||
|
||||
For example, to test the equality comparison
|
||||
for a Complex number class, write:
|
||||
|
||||
\code
|
||||
class ComplexNumberTest : public CppUnit::TestCase {
|
||||
public:
|
||||
ComplexNumberTest( std::string name ) : CppUnit::TestCase( name ) {}
|
||||
|
||||
void runTest() {
|
||||
CPPUNIT_ASSERT( Complex (10, 1) == Complex (10, 1) );
|
||||
CPPUNIT_ASSERT( !(Complex (1, 1) == Complex (2, 2)) );
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
That was a very simple test. Ordinarily,
|
||||
you'll have many little test cases that you'll
|
||||
want to run on the same set of objects. To do
|
||||
this, use a fixture.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section fixture Fixture
|
||||
A fixture is a known set of objects that
|
||||
serves as a base for a set of test cases.
|
||||
Fixtures come in very handy when you are
|
||||
testing as you develop.
|
||||
|
||||
Let's try out this style of development and
|
||||
learn about fixtures along the away. Suppose
|
||||
that we are really developing a complex
|
||||
number class. Let's start by defining a
|
||||
empty class named Complex.
|
||||
|
||||
\code
|
||||
class Complex {};
|
||||
\endcode
|
||||
|
||||
Now create an instance of ComplexNumberTest
|
||||
above, compile the code and see what happens.
|
||||
The first thing we notice is a few compiler
|
||||
errors. The test uses <tt>operator ==</tt>, but it is
|
||||
not defined. Let's fix that.
|
||||
|
||||
\code
|
||||
bool operator==( const Complex &a, const Complex &b)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
\endcode
|
||||
|
||||
Now compile the test, and run it. This time it
|
||||
compiles but the test fails.
|
||||
We need a bit more to get an <tt>operator ==</tt>working
|
||||
correctly, so we revisit the code.
|
||||
|
||||
\code
|
||||
class Complex {
|
||||
friend bool operator ==(const Complex& a, const Complex& b);
|
||||
double real, imaginary;
|
||||
public:
|
||||
Complex( double r, double i = 0 )
|
||||
: real(r)
|
||||
, imaginary(i)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
bool operator ==( const Complex &a, const Complex &b )
|
||||
{
|
||||
return a.real == b.real && a.imaginary == b.imaginary;
|
||||
}
|
||||
\endcode
|
||||
|
||||
If we compile now and run our test it will pass.
|
||||
|
||||
Now we are ready to add new operations and
|
||||
new tests. At this point a fixture would be
|
||||
handy. We would probably be better off when
|
||||
doing our tests if we decided to instantiate
|
||||
three or four complex numbers and reuse them
|
||||
across our tests.
|
||||
|
||||
Here is how we do it:
|
||||
- Add member variables for each part of the
|
||||
\link CppUnit::TestFixture fixture \endlink
|
||||
- Override \link CppUnit::TestFixture::setUp() setUp() \endlink
|
||||
to initialize the variables
|
||||
- Override \link CppUnit::TestFixture::tearDown() tearDown() \endlink
|
||||
to release any permanent resources you allocated in
|
||||
\link CppUnit::TestFixture::setUp() setUp() \endlink
|
||||
|
||||
\code
|
||||
class ComplexNumberTest : public CppUnit::TestFixture {
|
||||
private:
|
||||
Complex *m_10_1, *m_1_1, *m_11_2;
|
||||
public:
|
||||
void setUp()
|
||||
{
|
||||
m_10_1 = new Complex( 10, 1 );
|
||||
m_1_1 = new Complex( 1, 1 );
|
||||
m_11_2 = new Complex( 11, 2 );
|
||||
}
|
||||
|
||||
void tearDown()
|
||||
{
|
||||
delete m_10_1;
|
||||
delete m_1_1;
|
||||
delete m_11_2;
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
Once we have this fixture, we can add the complex
|
||||
addition test case and any others that we need
|
||||
over the course of our development.
|
||||
|
||||
|
||||
|
||||
\section test_case Test Case
|
||||
|
||||
How do you write and invoke individual tests using a fixture?
|
||||
|
||||
There are two steps to this process:
|
||||
- Write the test case as a method in the fixture class
|
||||
- Create a TestCaller which runs that particular method
|
||||
|
||||
Here is our test case class with a few extra case methods:
|
||||
|
||||
\code
|
||||
class ComplexNumberTest : public CppUnit::TestFixture {
|
||||
private:
|
||||
Complex *m_10_1, *m_1_1, *m_11_2;
|
||||
public:
|
||||
void setUp()
|
||||
{
|
||||
m_10_1 = new Complex( 10, 1 );
|
||||
m_1_1 = new Complex( 1, 1 );
|
||||
m_11_2 = new Complex( 11, 2 );
|
||||
}
|
||||
|
||||
void tearDown()
|
||||
{
|
||||
delete m_10_1;
|
||||
delete m_1_1;
|
||||
delete m_11_2;
|
||||
}
|
||||
|
||||
void testEquality()
|
||||
{
|
||||
CPPUNIT_ASSERT( *m_10_1 == *m_10_1 );
|
||||
CPPUNIT_ASSERT( !(*m_10_1 == *m_11_2) );
|
||||
}
|
||||
|
||||
void testAddition()
|
||||
{
|
||||
CPPUNIT_ASSERT( *m_10_1 + *m_1_1 == *m_11_2 );
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
One may create and run instances for each test case like this:
|
||||
|
||||
\code
|
||||
CppUnit::TestCaller<ComplexNumberTest> test( "testEquality",
|
||||
&ComplexNumberTest::testEquality );
|
||||
CppUnit::TestResult result;
|
||||
test.run( &result );
|
||||
\endcode
|
||||
|
||||
The second argument to the test caller constructor is the address of
|
||||
a method on ComplexNumberTest. When the test caller is run,
|
||||
that specific method will be run. This is not a useful thing to do,
|
||||
however, as no diagnostics will be displayed.
|
||||
One will normally use a \link ExecutingTest TestRunner \endlink (see below)
|
||||
to display the results.
|
||||
|
||||
Once you have several tests, organize them into a suite.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section suite Suite
|
||||
|
||||
How do you set up your tests so that you can run them all at once?
|
||||
|
||||
%CppUnit provides a \link CppUnit::TestSuite TestSuite \endlink class
|
||||
that runs any number of TestCases together.
|
||||
|
||||
We saw, above, how to run a single test case.
|
||||
|
||||
To create a suite of two or more tests, you do the following:
|
||||
|
||||
\code
|
||||
CppUnit::TestSuite suite;
|
||||
CppUnit::TestResult result;
|
||||
suite.addTest( new CppUnit::TestCaller<ComplexNumberTest>(
|
||||
"testEquality",
|
||||
&ComplexNumberTest::testEquality ) );
|
||||
suite.addTest( new CppUnit::TestCaller<ComplexNumberTest>(
|
||||
"testAddition",
|
||||
&ComplexNumberTest::testAddition ) );
|
||||
suite.run( &result );
|
||||
\endcode
|
||||
|
||||
\link CppUnit::TestSuite TestSuites \endlink don't only have to
|
||||
contain callers for TestCases. They can contain any object
|
||||
that implements the \link CppUnit::Test Test \endlink interface.
|
||||
For example, you can create a
|
||||
\link CppUnit::TestSuite TestSuite \endlink in your code and
|
||||
I can create one in mine, and we can run them together
|
||||
by creating a \link CppUnit::TestSuite TestSuite \endlink
|
||||
that contains both:
|
||||
|
||||
\code
|
||||
CppUnit::TestSuite suite;
|
||||
CppUnit::TestResult result;
|
||||
suite.addTest( ComplexNumberTest::suite() );
|
||||
suite.addTest( SurrealNumberTest::suite() );
|
||||
suite.run( &result );
|
||||
\endcode
|
||||
|
||||
|
||||
|
||||
|
||||
\section test_runner TestRunner
|
||||
|
||||
How do you run your tests and collect their results?
|
||||
|
||||
Once you have a test suite, you'll want to run it. %CppUnit provides tools
|
||||
to define the suite to be run and to display its results.
|
||||
You make your suite accessible to a \link ExecutingTest TestRunner \endlink
|
||||
program with a static method <I>suite</I> that returns a test suite.
|
||||
|
||||
For example, to make a ComplexNumberTest suite available to a
|
||||
\link ExecutingTest TestRunner \endlink, add the following code to
|
||||
ComplexNumberTest:
|
||||
|
||||
\code
|
||||
public:
|
||||
static CppUnit::TestSuite *suite()
|
||||
{
|
||||
CppUnit::TestSuite *suiteOfTests = new CppUnit::TestSuite( "ComplexNumberTest" );
|
||||
suiteOfTests->addTest( new CppUnit::TestCaller<ComplexNumberTest>(
|
||||
"testEquality",
|
||||
&ComplexNumberTest::testEquality ) );
|
||||
suiteOfTests->addTest( new CppUnit::TestCaller<ComplexNumberTest>(
|
||||
"testAddition",
|
||||
&ComplexNumberTest::testAddition ) );
|
||||
return suiteOfTests;
|
||||
}
|
||||
\endcode
|
||||
|
||||
\anchor test_runner_code
|
||||
To use the text version, include the header files for the tests in Main.cpp:
|
||||
|
||||
\code
|
||||
#include <cppunit/ui/text/TestRunner.h>
|
||||
#include "ExampleTestCase.h"
|
||||
#include "ComplexNumberTest.h"
|
||||
\endcode
|
||||
|
||||
And add a call to
|
||||
\link ::CppUnit::TextUi::TestRunner::addTest addTest(CppUnit::Test *) \endlink
|
||||
in the <tt>main()</tt> function:
|
||||
|
||||
\code
|
||||
int main( int argc, char **argv)
|
||||
{
|
||||
CppUnit::TextUi::TestRunner runner;
|
||||
runner.addTest( ExampleTestCase::suite() );
|
||||
runner.addTest( ComplexNumberTest::suite() );
|
||||
runner.run();
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
The \link ExecutingTest TestRunner \endlink will run the tests.
|
||||
If all the tests pass, you'll get an informative message.
|
||||
If any fail, you'll get the following information:
|
||||
|
||||
- The name of the test case that failed
|
||||
- The name of the source file that contains the test
|
||||
- The line number where the failure occurred
|
||||
- All of the text inside the call to CPPUNIT_ASSERT() which detected the failure
|
||||
|
||||
%CppUnit distinguishes between <I>failures</I> and <I>errors</I>. A failure is
|
||||
anticipated and checked for with assertions. Errors are unanticipated problems
|
||||
like division by zero and other exceptions thrown by the C++ runtime or your code.
|
||||
|
||||
|
||||
|
||||
|
||||
\section helper_macros Helper Macros
|
||||
|
||||
As you might have noticed, implementing the fixture static <tt>suite()</tt>
|
||||
method is a repetitive and error prone task. A \ref WritingTestFixture set of
|
||||
macros have been created to automatically implements the
|
||||
static <tt>suite()</tt> method.
|
||||
|
||||
The following code is a rewrite of ComplexNumberTest using those macros:
|
||||
|
||||
\code
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
class ComplexNumberTest : public CppUnit::TestFixture {
|
||||
\endcode
|
||||
First, we declare the suite, passing the class name to the macro:
|
||||
\code
|
||||
CPPUNIT_TEST_SUITE( ComplexNumberTest );
|
||||
\endcode
|
||||
The suite created by the static <tt>suite()</tt> method is named after
|
||||
the class name.
|
||||
Then, we declare each test case of the fixture:
|
||||
\code
|
||||
CPPUNIT_TEST( testEquality );
|
||||
CPPUNIT_TEST( testAddition );
|
||||
\endcode
|
||||
Finally, we end the suite declaration:
|
||||
\code
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
\endcode
|
||||
At this point, a method with the following signature has been implemented:
|
||||
\code
|
||||
static CppUnit::TestSuite *suite();
|
||||
\endcode
|
||||
The rest of the fixture is left unchanged:
|
||||
\code
|
||||
private:
|
||||
Complex *m_10_1, *m_1_1, *m_11_2;
|
||||
public:
|
||||
void setUp()
|
||||
{
|
||||
m_10_1 = new Complex( 10, 1 );
|
||||
m_1_1 = new Complex( 1, 1 );
|
||||
m_11_2 = new Complex( 11, 2 );
|
||||
}
|
||||
|
||||
void tearDown()
|
||||
{
|
||||
delete m_10_1;
|
||||
delete m_1_1;
|
||||
delete m_11_2;
|
||||
}
|
||||
|
||||
void testEquality()
|
||||
{
|
||||
CPPUNIT_ASSERT( *m_10_1 == *m_10_1 );
|
||||
CPPUNIT_ASSERT( !(*m_10_1 == *m_11_2) );
|
||||
}
|
||||
|
||||
void testAddition()
|
||||
{
|
||||
CPPUNIT_ASSERT( *m_10_1 + *m_1_1 == *m_11_2 );
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
The name of the \link CppUnit::TestCaller TestCaller \endlink added to the
|
||||
suite are a composition of the fixture name and the method name.
|
||||
|
||||
In the present case, the names would be:
|
||||
"ComplexNumberTest.testEquality" and "ComplexNumberTest.testAddition".
|
||||
|
||||
The \link WritingTestFixture helper macros \endlink help you write comon assertion.
|
||||
For example, to check that ComplexNumber throws a MathException when dividing
|
||||
a number by 0:
|
||||
- add the test to the suite using CPPUNIT_TEST_EXCEPTION, specifying the expected
|
||||
exception type.
|
||||
- write the test case method
|
||||
|
||||
\code
|
||||
CPPUNIT_TEST_SUITE( ComplexNumberTest );
|
||||
// [...]
|
||||
CPPUNIT_TEST_EXCEPTION( testDivideByZeroThrows, MathException );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
// [...]
|
||||
|
||||
void testDivideByZeroThrows()
|
||||
{
|
||||
// The following line should throw a MathException.
|
||||
*m_10_1 / ComplexNumber(0);
|
||||
}
|
||||
\endcode
|
||||
|
||||
If the expected exception is not thrown, then a assertion failure is reported.
|
||||
|
||||
|
||||
|
||||
|
||||
\section test_factory_registry TestFactoryRegistry
|
||||
|
||||
The TestFactoryRegistry was created to solve two pitfalls:
|
||||
- forgetting to add your fixture suite to the test runner (since it is in
|
||||
another file, it is easy to forget)
|
||||
- compilation bottleneck caused by the inclusion of all test case headers
|
||||
(see \ref test_runner_code "previous example")
|
||||
|
||||
The TestFactoryRegistry is a place where suites can be registered at initialization
|
||||
time.
|
||||
|
||||
To register the ComplexNumber suite, in the .cpp file, you add:
|
||||
|
||||
\code
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumberTest );
|
||||
\endcode
|
||||
|
||||
Behind the scene, a static variable type of
|
||||
\link CppUnit::AutoRegisterSuite AutoRegisterSuite \endlink is declared.
|
||||
On construction, it will
|
||||
\link CppUnit::TestFactoryRegistry::registerFactory(TestFactory*) register \endlink
|
||||
a \link CppUnit::TestSuiteFactory TestSuiteFactory \endlink into the
|
||||
\link CppUnit::TestFactoryRegistry TestFactoryRegistry \endlink.
|
||||
The \link CppUnit::TestSuiteFactory TestSuiteFactory \endlink returns
|
||||
the \link CppUnit::TestSuite TestSuite \endlink returned by ComplexNumber::suite().
|
||||
|
||||
To run the tests, using the text test runner, we don't need to include the fixture
|
||||
anymore:
|
||||
|
||||
\code
|
||||
#include <cppunit/extensions/TestFactoryRegistry.h>
|
||||
#include <cppunit/ui/text/TestRunner.h>
|
||||
|
||||
int main( int argc, char **argv)
|
||||
{
|
||||
CppUnit::TextUi::TestRunner runner;
|
||||
\endcode
|
||||
First, we retreive the instance of the
|
||||
\link CppUnit::TestFactoryRegistry TestFactoryRegistry \endlink:
|
||||
\code
|
||||
CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry();
|
||||
\endcode
|
||||
Then, we obtain and add a new \link CppUnit::TestSuite TestSuite \endlink created
|
||||
by the \link CppUnit::TestFactoryRegistry TestFactoryRegistry \endlink that
|
||||
contains all the test suite registered using CPPUNIT_TEST_SUITE_REGISTRATION().
|
||||
\code
|
||||
runner.addTest( registry.makeTest() );
|
||||
runner.run();
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
|
||||
|
||||
|
||||
\section post_build_check Post-build check
|
||||
|
||||
Well, now that we have our unit tests running, how about integrating unit
|
||||
testing to our build process ?
|
||||
|
||||
To do that, the application must returns a value different than 0 to indicate that
|
||||
there was an error.
|
||||
|
||||
\link CppUnit::TextUi::TestRunner::run() TestRunner::run() \endlink returns
|
||||
a boolean indicating if the run was successful.
|
||||
|
||||
Updating our main programm, we obtains:
|
||||
\code
|
||||
#include <cppunit/extensions/TestFactoryRegistry.h>
|
||||
#include <cppunit/ui/text/TestRunner.h>
|
||||
|
||||
int main( int argc, char **argv)
|
||||
{
|
||||
CppUnit::TextUi::TestRunner runner;
|
||||
CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry();
|
||||
runner.addTest( registry.makeTest() );
|
||||
bool wasSuccessful = runner.run( "", false );
|
||||
return !wasSuccessful;
|
||||
}
|
||||
\endcode
|
||||
|
||||
Now, you need to run your application after compilation.
|
||||
|
||||
With Visual C++, this is done in <em>Project Settings/Post-Build step</em>,
|
||||
by adding the following command: <tt>"$(TargetPath)"</tt>. It is expanded to
|
||||
the application executable path. Look up the project
|
||||
<tt>examples/cppunittest/CppUnitTestMain.dsp</tt> which
|
||||
use that technic.
|
||||
|
||||
|
||||
|
||||
Original version by Michael Feathers.
|
||||
Doxygen conversion and update by Baptiste Lepilleur.
|
||||
*/
|
23
doc/footer.html
Normal file
23
doc/footer.html
Normal file
@ -0,0 +1,23 @@
|
||||
<hr>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="10%" align="left" valign="center">
|
||||
<a href="http://sourceforge.net">
|
||||
<img
|
||||
src="http://sourceforge.net/sflogo.php?group_id=11795"
|
||||
width="88" height="31" border="0" alt="SourceForge Logo"></a>
|
||||
</td>
|
||||
<td width="20%" align="left" valign="center">
|
||||
hosts this site.
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td align="right" valign="center">
|
||||
Send comments to:<br>
|
||||
<a href="mailto:cppunit-devel@lists.sourceforge.net">CppUnit Developers</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
27
doc/header.html
Normal file
27
doc/header.html
Normal file
@ -0,0 +1,27 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
CppUnit - The Unit Testing Library
|
||||
</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="center">
|
||||
<a href="http://sourceforge.net/projects/cppunit">
|
||||
CppUnit project page
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="FAQ">FAQ</a>
|
||||
</td>
|
||||
<td width="40%" align="right" valign="center">
|
||||
<a href="http://cppunit.sourceforge.net">CppUnit home page</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
147
doc/other_documentation.dox
Normal file
147
doc/other_documentation.dox
Normal file
@ -0,0 +1,147 @@
|
||||
/**
|
||||
\mainpage
|
||||
|
||||
\section _history History
|
||||
The first port of JUnit to C++ was done
|
||||
by Michael Feathers. His versions
|
||||
can be found on the
|
||||
<a href="http://www.xprogramming.com/software.htm">
|
||||
XProgramming software page</a>. They are os-specific,
|
||||
so Jerome Lacoste provided a port to Unix/Solaris.
|
||||
His version can be found on the same page.
|
||||
The %CppUnit project has combined and built on this work.
|
||||
|
||||
\section _usage Usage
|
||||
Take a look into the \ref cppunit_cookbook.
|
||||
It gives a quick start into using this
|
||||
testing framework. <a href="modules.html">Modules</a> give
|
||||
you a organized view of %CppUnit classes.
|
||||
|
||||
(Notes to newbies, you may want to check out \ref money_example,
|
||||
a work in progress, but the project is provided with %CppUnit).
|
||||
|
||||
For a discussion on %CppUnit, check
|
||||
<a href="http://c2.com/cgi/wiki?CppUnit">
|
||||
the WikiWiki Pages on CppUnit</a>. There you can also
|
||||
find the original versions and various ports to other
|
||||
OSses and languages.
|
||||
|
||||
\section _license License
|
||||
This library is released under
|
||||
the GNU
|
||||
<a href="http://www.gnu.org/copyleft/lesser.html">
|
||||
Lesser General Public License</a>.
|
||||
|
||||
\author Eric Sommerlade (sommerlade@gmx.net)
|
||||
\author Michael Feathers (mfeathers@objectmentor.com)
|
||||
\author Jerome Lacoste (lacostej@altern.org)
|
||||
\author Baptiste Lepilleur <blep@users.sourceforge.net>
|
||||
\author Bastiaan Bakker <bastiaan.bakker@lifeline.nl>
|
||||
\author Steve Robbins <smr99@sourceforge.net>
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*! \defgroup WritingTestFixture Writing test fixture
|
||||
*/
|
||||
|
||||
/*! \defgroup Assertions Making assertions
|
||||
*/
|
||||
|
||||
/*! \defgroup CreatingTestSuite Creating TestSuite
|
||||
*/
|
||||
|
||||
/*! \defgroup ExecutingTest Executing test
|
||||
*/
|
||||
|
||||
/*! \defgroup TrackingTestExecution Tracking test execution
|
||||
*/
|
||||
|
||||
/*! \defgroup WritingTestResult Writing test result
|
||||
*/
|
||||
|
||||
/*! \defgroup BrowsingCollectedTestResult Browsing collected test result
|
||||
*/
|
||||
|
||||
/*! \defgroup CreatingNewAssertions Creating custom assertions
|
||||
*/
|
||||
|
||||
/*! \defgroup WritingTestPlugIn Writing Test Plug-in
|
||||
*
|
||||
* Creating a test plug-in is really simple:
|
||||
* - make your project a dynamic library (with VC++, choose Win32 Dynamic Library in
|
||||
* the project wizard), and link against the dynamic library version of %CppUnit
|
||||
* (cppunit*_dll.lib for VC++).
|
||||
* - in a cpp file, include TestPlugIn.h, and use the macro CPPUNIT_PLUGIN_IMPLEMENT()
|
||||
* to declare the test plug-in.
|
||||
* - That's it, you're done! All the tests registered using the TestFactoryRegistry,
|
||||
* CPPUNIT_TEST_SUITE_NAMED_REGISTRATION, or CPPUNIT_TEST_SUITE_REGISTRATION will
|
||||
* be visible to other plug-in and to the DllPlugInRunner.
|
||||
*
|
||||
* Example:
|
||||
* \code
|
||||
* #include <cppunit/include/plugin/TestPlugIn.h>
|
||||
*
|
||||
* CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
* \endcode
|
||||
*
|
||||
* The interface CppUnitTestPlugIn is automatically implemented by the previous
|
||||
* macro. You can define your own implementation.
|
||||
*
|
||||
* To provide your custom implementation of the plug-in interface, you must:
|
||||
* - create a class that implements the CppUnitTestPlugIn interface
|
||||
* - use CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL() with your class to export
|
||||
* the plug-in interface
|
||||
* - implements the 'main' function with CPPUNIT_PLUGIN_IMPLEMENT_MAIN().
|
||||
*
|
||||
* Some of the reason you may want to do this:
|
||||
* - You do not use the TestFactoryRegistry to register your test.
|
||||
* - You want to create a custom listener to use with DllPlugInRunner.
|
||||
* - You want to do initialize some globale resources before running the test
|
||||
* (setting up COM for example).
|
||||
*
|
||||
* See CppUnitTestPlugIn for further detail on how to do this.
|
||||
*
|
||||
* Creating your own test plug-in with VC++:
|
||||
* - Create a new "Win32 Dynamic Library" project, choose the empty template
|
||||
* - For the Debug Configuration, add cppunitd_dll.lib to
|
||||
* 'Project Settings/Link/Object/Libariries modules', and for the Release
|
||||
* Configuration, add cppunit_dll.lib.
|
||||
* - For All Configuration, in 'C++/Preprocessor/Preprocessors definitions',
|
||||
* add the symbol 'CPPUNIT_DLL' at the end of the line (it means that
|
||||
* you are linking against cppunit dll).
|
||||
* - Create a 'main' file that contains:
|
||||
\verbatim
|
||||
#include <cppunit/plugin/TestPlugIn.h>
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();\endverbatim
|
||||
* - Add your tests
|
||||
* - You're done !
|
||||
*
|
||||
* See examples/simple/simple_plugin.dsp for an example.
|
||||
*
|
||||
* Notes to VC++ users:
|
||||
* - you can run a post-build check on the plug-in. Add the following line to your
|
||||
* post-build tab: "DllPlugInTesterd_dll.exe $(TargetPath)". DllPlugInTesterd_dll.exe
|
||||
* need to be some place were it can be found (path, ...), or you need to
|
||||
* indicate the correct path.
|
||||
* $(TargetPath) is the filename of your plug-in.
|
||||
* - you can debug your DLL, set the executable for debug session to the plug-in
|
||||
* runner, and the name of the DLL in the program arguments ($(xxx) won't work
|
||||
* this time).
|
||||
*
|
||||
* How does it works ?
|
||||
*
|
||||
* When %CppUnit is linked as a DLL, the singleton used for the TestFactoryRegistry
|
||||
* is the same for the plug-in runner (also linked against %CppUnit DLL). This means
|
||||
* that the tests registered with the macros (at static initialization) are
|
||||
* registered in the same registry. As soon as a DLL is loaded by the PlugInManager,
|
||||
* the DLL static variable are constructed and the test registered to the
|
||||
* TestFactoryRegistry.
|
||||
*
|
||||
* After loading the DLL, the PlugInManager look-up a specific function exported by
|
||||
* the DLL. That function returns a pointer on the plug-in interface, which is later
|
||||
* used by the PlugInManager.
|
||||
*
|
||||
* \see CreatingTestSuite.
|
||||
*/
|
123
examples/ClockerPlugIn/ClockerListener.cpp
Normal file
123
examples/ClockerPlugIn/ClockerListener.cpp
Normal file
@ -0,0 +1,123 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Implementation file ClockerListener.cpp for class ClockerListener
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/04/19
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#include <cppunit/Test.h>
|
||||
#include <cppunit/portability/Stream.h>
|
||||
#include "ClockerListener.h"
|
||||
#include "ClockerModel.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
ClockerListener::ClockerListener( ClockerModel *model,
|
||||
bool text )
|
||||
: m_model( model )
|
||||
, m_text( text )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ClockerListener::~ClockerListener()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::startTestRun( CPPUNIT_NS::Test *test,
|
||||
CPPUNIT_NS::TestResult *eventManager )
|
||||
{
|
||||
m_model->setExpectedTestCount( test->countTestCases() *2 );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::endTestRun( CPPUNIT_NS::Test *test,
|
||||
CPPUNIT_NS::TestResult *eventManager )
|
||||
{
|
||||
if ( m_text )
|
||||
printStatistics();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::startTest( CPPUNIT_NS::Test *test )
|
||||
{
|
||||
m_model->enterTest( test, false );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::endTest( CPPUNIT_NS::Test *test )
|
||||
{
|
||||
m_model->exitTest( test, false );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::startSuite( CPPUNIT_NS::Test *suite )
|
||||
{
|
||||
m_model->enterTest( suite, true );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::endSuite( CPPUNIT_NS::Test *suite )
|
||||
{
|
||||
m_model->exitTest( suite, true );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::printStatistics() const
|
||||
{
|
||||
printTest( 0, "" );
|
||||
CPPUNIT_NS::stdCOut() << "\n";
|
||||
CPPUNIT_NS::stdCOut() << "Total elapsed time: ";
|
||||
printTime( m_model->totalElapsedTime() );
|
||||
CPPUNIT_NS::stdCOut() << ", average test case time: ";
|
||||
printTime( m_model->averageTestCaseTime() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::printTest( int testIndex,
|
||||
const std::string &indentString ) const
|
||||
{
|
||||
std::string indent = indentString;
|
||||
const int indentLength = 3;
|
||||
|
||||
printTestIndent( indentString, indentLength );
|
||||
printTime( m_model->testTimeFor( testIndex ) );
|
||||
|
||||
CPPUNIT_NS::stdCOut() << m_model->testPathFor( testIndex ).getChildTest()->getName();
|
||||
CPPUNIT_NS::stdCOut() << "\n";
|
||||
|
||||
if ( m_model->childCountFor( testIndex ) == 0 )
|
||||
indent+= std::string( indentLength, ' ' );
|
||||
else
|
||||
indent+= "|" + std::string( indentLength -1, ' ' );
|
||||
|
||||
for ( int index =0; index < m_model->childCountFor( testIndex ); ++index )
|
||||
printTest( m_model->childAtFor( testIndex, index ), indent );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::printTestIndent( const std::string &indent,
|
||||
const int indentLength ) const
|
||||
{
|
||||
if ( indent.empty() )
|
||||
return;
|
||||
|
||||
CPPUNIT_NS::stdCOut() << " ";
|
||||
CPPUNIT_NS::stdCOut() << indent.substr( 0, indent.length() - indentLength ) ;
|
||||
CPPUNIT_NS::stdCOut() << "+" << std::string( indentLength -1, '-' );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerListener::printTime( double time ) const
|
||||
{
|
||||
CPPUNIT_NS::stdCOut() << '(' << ClockerModel::timeStringFor( time ) << "s) ";
|
||||
}
|
66
examples/ClockerPlugIn/ClockerListener.h
Normal file
66
examples/ClockerPlugIn/ClockerListener.h
Normal file
@ -0,0 +1,66 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Header file ClockerListener.h for class ClockerListener
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/04/19
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CLOCKERLISTENER_H
|
||||
#define CLOCKERLISTENER_H
|
||||
|
||||
#include <cppunit/TestListener.h>
|
||||
|
||||
class ClockerModel;
|
||||
|
||||
|
||||
/// TestListener that prints a flatten or hierarchical view of the test tree.
|
||||
class ClockerListener : public CPPUNIT_NS::TestListener
|
||||
{
|
||||
public:
|
||||
ClockerListener( ClockerModel *model,
|
||||
bool text );
|
||||
|
||||
virtual ~ClockerListener();
|
||||
|
||||
void startTestRun( CPPUNIT_NS::Test *test,
|
||||
CPPUNIT_NS::TestResult *eventManager );
|
||||
|
||||
void endTestRun( CPPUNIT_NS::Test *test,
|
||||
CPPUNIT_NS::TestResult *eventManager );
|
||||
|
||||
void startTest( CPPUNIT_NS::Test *test );
|
||||
|
||||
void endTest( CPPUNIT_NS::Test *test );
|
||||
|
||||
void startSuite( CPPUNIT_NS::Test *suite );
|
||||
|
||||
void endSuite( CPPUNIT_NS::Test *suite );
|
||||
|
||||
private:
|
||||
void printStatistics() const;
|
||||
|
||||
void printTest( int testIndex,
|
||||
const std::string &indentString ) const;
|
||||
|
||||
void printTestIndent( const std::string &indent,
|
||||
const int indentLength ) const;
|
||||
|
||||
void printTime( double time ) const;
|
||||
|
||||
/// Prevents the use of the copy constructor.
|
||||
ClockerListener( const ClockerListener &other );
|
||||
|
||||
/// Prevents the use of the copy operator.
|
||||
void operator =( const ClockerListener &other );
|
||||
|
||||
private:
|
||||
ClockerModel *m_model;
|
||||
bool m_text;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Inlines methods for ClockerListener:
|
||||
// -----------------------------------
|
||||
|
||||
|
||||
|
||||
#endif // CLOCKERLISTENER_H
|
146
examples/ClockerPlugIn/ClockerModel.cpp
Normal file
146
examples/ClockerPlugIn/ClockerModel.cpp
Normal file
@ -0,0 +1,146 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Implementation file ClockerModel.cpp for class ClockerModel
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/06/14
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#include "ClockerModel.h"
|
||||
#include <cppunit/config/SourcePrefix.h>
|
||||
|
||||
|
||||
ClockerModel::ClockerModel()
|
||||
: m_testCaseCount( 0 )
|
||||
, m_totalTestCaseTime( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ClockerModel::~ClockerModel()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerModel::setExpectedTestCount( int count )
|
||||
{
|
||||
m_tests.reserve( count );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerModel::enterTest( CPPUNIT_NS::Test *test,
|
||||
bool isSuite )
|
||||
{
|
||||
m_currentPath.add( test );
|
||||
|
||||
int testIndex = m_tests.size();
|
||||
if ( !m_testIndexes.empty() )
|
||||
m_tests[ m_testIndexes.top() ].m_childIndexes.push_back( testIndex );
|
||||
m_testIndexes.push( testIndex );
|
||||
m_testToIndexes.insert( TestToIndexes::value_type( test, testIndex ) );
|
||||
|
||||
TestInfo info;
|
||||
info.m_timer.start();
|
||||
info.m_path = m_currentPath;
|
||||
info.m_isSuite = isSuite;
|
||||
|
||||
m_tests.push_back( info );
|
||||
|
||||
if ( !isSuite )
|
||||
++m_testCaseCount;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerModel::exitTest( CPPUNIT_NS::Test *test,
|
||||
bool isSuite )
|
||||
{
|
||||
m_tests[ m_testIndexes.top() ].m_timer.finish();
|
||||
if ( !isSuite )
|
||||
m_totalTestCaseTime += m_tests.back().m_timer.elapsedTime();
|
||||
|
||||
m_currentPath.up();
|
||||
m_testIndexes.pop();
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
ClockerModel::totalElapsedTime() const
|
||||
{
|
||||
return m_tests[0].m_timer.elapsedTime();
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
ClockerModel::averageTestCaseTime() const
|
||||
{
|
||||
double average = 0;
|
||||
if ( m_testCaseCount > 0 )
|
||||
average = m_totalTestCaseTime / m_testCaseCount;
|
||||
return average;
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
ClockerModel::testTimeFor( int testIndex ) const
|
||||
{
|
||||
return m_tests[ testIndex ].m_timer.elapsedTime();
|
||||
}
|
||||
|
||||
|
||||
std::string
|
||||
ClockerModel::timeStringFor( double time )
|
||||
{
|
||||
char buffer[320];
|
||||
const char *format;
|
||||
if ( time < 1 )
|
||||
format = "%2.3f";
|
||||
else if ( time < 10 )
|
||||
format = "%3.2f";
|
||||
else if (time < 100 )
|
||||
format = "%4.1f";
|
||||
else
|
||||
format = "%6f";
|
||||
|
||||
::sprintf( buffer, format, time );
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ClockerModel::isSuite( int testIndex ) const
|
||||
{
|
||||
return m_tests[ testIndex ].m_isSuite;
|
||||
}
|
||||
|
||||
|
||||
const CPPUNIT_NS::TestPath &
|
||||
ClockerModel::testPathFor( int testIndex ) const
|
||||
{
|
||||
return m_tests[ testIndex ].m_path;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ClockerModel::indexOf( CPPUNIT_NS::Test *test ) const
|
||||
{
|
||||
TestToIndexes::const_iterator itFound = m_testToIndexes.find( test );
|
||||
if ( itFound != m_testToIndexes.end() )
|
||||
return itFound->second;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ClockerModel::childCountFor( int testIndex ) const
|
||||
{
|
||||
return m_tests[ testIndex ].m_childIndexes.size();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ClockerModel::childAtFor( int testIndex,
|
||||
int chidIndex ) const
|
||||
{
|
||||
return m_tests[ testIndex ].m_childIndexes[ chidIndex ];
|
||||
}
|
95
examples/ClockerPlugIn/ClockerModel.h
Normal file
95
examples/ClockerPlugIn/ClockerModel.h
Normal file
@ -0,0 +1,95 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Header file ClockerModel.h for class ClockerModel
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/06/14
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CLOCKERMODEL_H
|
||||
#define CLOCKERMODEL_H
|
||||
|
||||
#include <cppunit/TestPath.h>
|
||||
#include <cppunit/portability/CppUnitVector.h>
|
||||
#include <cppunit/portability/CppUnitMap.h>
|
||||
#include <cppunit/portability/CppUnitStack.h>
|
||||
#include <string>
|
||||
|
||||
#ifdef CLOCKER_USE_WINNTTIMER
|
||||
#include "WinNtTimer.h"
|
||||
typedef WinNtTimer Timer;
|
||||
#else
|
||||
#include "Timer.h"
|
||||
#endif
|
||||
|
||||
|
||||
/// Model that represents test timing.
|
||||
class ClockerModel
|
||||
{
|
||||
public:
|
||||
/*! Constructs a ClockerModel object.
|
||||
*/
|
||||
ClockerModel();
|
||||
|
||||
/// Destructor.
|
||||
virtual ~ClockerModel();
|
||||
|
||||
void setExpectedTestCount( int count );
|
||||
|
||||
void enterTest( CPPUNIT_NS::Test *test,
|
||||
bool isSuite );
|
||||
|
||||
void exitTest( CPPUNIT_NS::Test *test,
|
||||
bool isSuite );
|
||||
|
||||
double totalElapsedTime() const;
|
||||
|
||||
double averageTestCaseTime() const;
|
||||
|
||||
double testTimeFor( CPPUNIT_NS::Test *test ) const;
|
||||
|
||||
double testTimeFor( int testIndex ) const;
|
||||
|
||||
static std::string timeStringFor( double time );
|
||||
|
||||
bool isSuite( int testIndex ) const;
|
||||
|
||||
const CPPUNIT_NS::TestPath &testPathFor( int testIndex ) const;
|
||||
|
||||
// -1 is none
|
||||
int indexOf( CPPUNIT_NS::Test *test ) const;
|
||||
|
||||
int childCountFor( int testIndex ) const;
|
||||
|
||||
int childAtFor( int testIndex,
|
||||
int chidIndex ) const;
|
||||
|
||||
private:
|
||||
struct TestInfo
|
||||
{
|
||||
CPPUNIT_NS::TestPath m_path;
|
||||
Timer m_timer;
|
||||
bool m_isSuite;
|
||||
CppUnitVector<int> m_childIndexes;
|
||||
};
|
||||
|
||||
/// Prevents the use of the copy constructor.
|
||||
ClockerModel( const ClockerModel &other );
|
||||
|
||||
/// Prevents the use of the copy operator.
|
||||
void operator =( const ClockerModel &other );
|
||||
|
||||
private:
|
||||
CPPUNIT_NS::TestPath m_currentPath;
|
||||
|
||||
int m_testCaseCount;
|
||||
double m_totalTestCaseTime;
|
||||
|
||||
typedef CppUnitMap<CPPUNIT_NS::Test *, int> TestToIndexes;
|
||||
|
||||
TestToIndexes m_testToIndexes;
|
||||
CppUnitStack<int> m_testIndexes;
|
||||
CppUnitVector<TestInfo> m_tests;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // CLOCKERMODEL_H
|
78
examples/ClockerPlugIn/ClockerPlugIn.cpp
Normal file
78
examples/ClockerPlugIn/ClockerPlugIn.cpp
Normal file
@ -0,0 +1,78 @@
|
||||
#include <cppunit/config/SourcePrefix.h> // disabled unwanted warning on vc++ 6.0
|
||||
#include <cppunit/TestResult.h>
|
||||
#include <cppunit/XmlOutputter.h>
|
||||
#include <cppunit/plugin/TestPlugIn.h>
|
||||
#include "ClockerXmlHook.h"
|
||||
#include "ClockerListener.h"
|
||||
#include "ClockerModel.h"
|
||||
|
||||
|
||||
|
||||
class ClockerPlugIn : public CppUnitTestPlugIn
|
||||
{
|
||||
public:
|
||||
ClockerPlugIn()
|
||||
: m_dumper( NULL )
|
||||
, m_model( NULL )
|
||||
, m_xmlHook( NULL )
|
||||
{
|
||||
}
|
||||
|
||||
~ClockerPlugIn()
|
||||
{
|
||||
delete m_dumper;
|
||||
delete m_model;
|
||||
delete m_xmlHook;
|
||||
}
|
||||
|
||||
|
||||
void initialize( CPPUNIT_NS::TestFactoryRegistry *registry,
|
||||
const CPPUNIT_NS::PlugInParameters ¶meters )
|
||||
{
|
||||
bool text = false;
|
||||
if ( parameters.getCommandLine() == "text" )
|
||||
text = true;
|
||||
|
||||
m_model = new ClockerModel();
|
||||
m_dumper = new ClockerListener( m_model, text );
|
||||
m_xmlHook = new ClockerXmlHook( m_model );
|
||||
}
|
||||
|
||||
|
||||
void addListener( CPPUNIT_NS::TestResult *eventManager )
|
||||
{
|
||||
eventManager->addListener( m_dumper );
|
||||
}
|
||||
|
||||
|
||||
void removeListener( CPPUNIT_NS::TestResult *eventManager )
|
||||
{
|
||||
eventManager->removeListener( m_dumper );
|
||||
}
|
||||
|
||||
|
||||
void addXmlOutputterHooks( CPPUNIT_NS::XmlOutputter *outputter )
|
||||
{
|
||||
outputter->addHook( m_xmlHook );
|
||||
}
|
||||
|
||||
|
||||
void removeXmlOutputterHooks()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void uninitialize( CPPUNIT_NS::TestFactoryRegistry *registry )
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
ClockerListener *m_dumper;
|
||||
ClockerModel *m_model;
|
||||
ClockerXmlHook *m_xmlHook;
|
||||
};
|
||||
|
||||
|
||||
CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( ClockerPlugIn );
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT_MAIN();
|
229
examples/ClockerPlugIn/ClockerPlugIn.dsp
Normal file
229
examples/ClockerPlugIn/ClockerPlugIn.dsp
Normal file
@ -0,0 +1,229 @@
|
||||
# Microsoft Developer Studio Project File - Name="ClockerPlugIn" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=ClockerPlugIn - Win32 Debug NtTimer
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ClockerPlugIn.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ClockerPlugIn.mak" CFG="ClockerPlugIn - Win32 Debug NtTimer"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ClockerPlugIn - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "ClockerPlugIn - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "ClockerPlugIn - Win32 Debug NtTimer" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CLOCKERPLUGIN_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GR /GX /Zd /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunit_dll.lib /nologo /dll /machine:I386 /out:"../../lib/ClockerPlugIn.dll" /libpath:"../../lib/"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CLOCKERPLUGIN_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /debug /machine:I386 /out:"../../lib/ClockerPlugInd.dll" /pdbtype:sept /libpath:"../../lib/"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug NtTimer"
|
||||
# PROP BASE Intermediate_Dir "Debug NtTimer"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "DebugNtTimer"
|
||||
# PROP Intermediate_Dir "DebugNtTimer"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /D "CLOCKER_USE_WINNTTIMER" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /debug /machine:I386 /out:"../../lib/ClockerPlugInd.dll" /pdbtype:sept /libpath:"../../lib/"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /debug /machine:I386 /out:"../../lib/ClockerPlugInNtd.dll" /pdbtype:sept /libpath:"../../lib/"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ClockerPlugIn - Win32 Release"
|
||||
# Name "ClockerPlugIn - Win32 Debug"
|
||||
# Name "ClockerPlugIn - Win32 Debug NtTimer"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ClockerListener.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ClockerListener.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ClockerModel.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ClockerModel.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ClockerPlugIn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ClockerXmlHook.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ClockerXmlHook.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Makefile.am
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Timer.cpp
|
||||
|
||||
!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Timer.h
|
||||
|
||||
!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WinNtTimer.cpp
|
||||
|
||||
!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Intermediate_Dir "DebugNtTimer"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WinNtTimer.h
|
||||
|
||||
!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
94
examples/ClockerPlugIn/ClockerXmlHook.cpp
Normal file
94
examples/ClockerPlugIn/ClockerXmlHook.cpp
Normal file
@ -0,0 +1,94 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Implementation file ClockerXmlHook.cpp for class ClockerXmlHook
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/06/14
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cppunit/Test.h>
|
||||
#include <cppunit/tools/XmlDocument.h>
|
||||
#include <cppunit/tools/XmlElement.h>
|
||||
#include "ClockerModel.h"
|
||||
#include "ClockerXmlHook.h"
|
||||
|
||||
|
||||
ClockerXmlHook::ClockerXmlHook( ClockerModel *model )
|
||||
: m_model( model )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ClockerXmlHook::~ClockerXmlHook()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerXmlHook::endDocument( CPPUNIT_NS::XmlDocument *document )
|
||||
{
|
||||
CPPUNIT_NS::XmlElement *testTreeElement = new CPPUNIT_NS::XmlElement( "TimedTestTree" );
|
||||
document->rootElement().addElement( testTreeElement );
|
||||
|
||||
addTimedTest( testTreeElement, 0 );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerXmlHook::addTimedTest( CPPUNIT_NS::XmlElement *parentElement,
|
||||
int testIndex )
|
||||
{
|
||||
std::string elementName = m_model->isSuite( testIndex ) ? "TimedSuite" : "TimedTest";
|
||||
CPPUNIT_NS::XmlElement *testElement = new CPPUNIT_NS::XmlElement( elementName );
|
||||
parentElement->addElement( testElement );
|
||||
testElement->addAttribute( "id", testIndex );
|
||||
|
||||
const CPPUNIT_NS::TestPath &path = m_model->testPathFor( testIndex );
|
||||
testElement->addElement( new CPPUNIT_NS::XmlElement( "Name",
|
||||
path.getChildTest()->getName() ) );
|
||||
testElement->addElement( new CPPUNIT_NS::XmlElement( "TestPath", path.toString() ) );
|
||||
testElement->addElement( new CPPUNIT_NS::XmlElement( "Time",
|
||||
ClockerModel::timeStringFor(
|
||||
m_model->testTimeFor( testIndex ) ) ) );
|
||||
|
||||
if ( m_model->isSuite( testIndex ) )
|
||||
{
|
||||
for ( int childIndex =0; childIndex < m_model->childCountFor( testIndex ); ++childIndex )
|
||||
addTimedTest( testElement, m_model->childAtFor( testIndex, childIndex ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerXmlHook::failTestAdded( CPPUNIT_NS::XmlDocument *document,
|
||||
CPPUNIT_NS::XmlElement *testElement,
|
||||
CPPUNIT_NS::Test *test,
|
||||
CPPUNIT_NS::TestFailure *failure )
|
||||
{
|
||||
successfulTestAdded( document, testElement, test );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerXmlHook::successfulTestAdded( CPPUNIT_NS::XmlDocument *document,
|
||||
CPPUNIT_NS::XmlElement *testElement,
|
||||
CPPUNIT_NS::Test *test )
|
||||
{
|
||||
int testIndex = m_model->indexOf( test );
|
||||
double time = (testIndex >= 0) ? m_model->testTimeFor( testIndex ) : 0.0;
|
||||
const CPPUNIT_NS::TestPath &path = m_model->testPathFor( testIndex );
|
||||
testElement->addElement( new CPPUNIT_NS::XmlElement( "TestPath", path.toString() ) );
|
||||
testElement->addElement( new CPPUNIT_NS::XmlElement( "Time",
|
||||
ClockerModel::timeStringFor( time ) ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClockerXmlHook::statisticsAdded( CPPUNIT_NS::XmlDocument *document,
|
||||
CPPUNIT_NS::XmlElement *statisticsElement )
|
||||
{
|
||||
statisticsElement->addElement(
|
||||
new CPPUNIT_NS::XmlElement( "TotalElapsedTime",
|
||||
ClockerModel::timeStringFor( m_model->totalElapsedTime() ) ) );
|
||||
statisticsElement->addElement(
|
||||
new CPPUNIT_NS::XmlElement( "AverageTestCaseTime",
|
||||
ClockerModel::timeStringFor( m_model->averageTestCaseTime() ) ) );
|
||||
}
|
61
examples/ClockerPlugIn/ClockerXmlHook.h
Normal file
61
examples/ClockerPlugIn/ClockerXmlHook.h
Normal file
@ -0,0 +1,61 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Header file ClockerXmlHook.h for class ClockerXmlHook
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/06/14
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CLOCKERXMLHOOK_H
|
||||
#define CLOCKERXMLHOOK_H
|
||||
|
||||
#include <cppunit/XmlOutputterHook.h>
|
||||
|
||||
class ClockerModel;
|
||||
|
||||
|
||||
|
||||
/// XML output hook to add test timing and test hierarchy timing.
|
||||
class ClockerXmlHook : public CPPUNIT_NS::XmlOutputterHook
|
||||
{
|
||||
public:
|
||||
/*! Constructs a ClockerXmlHook object.
|
||||
*/
|
||||
ClockerXmlHook( ClockerModel *model );
|
||||
|
||||
/// Destructor.
|
||||
virtual ~ClockerXmlHook();
|
||||
|
||||
void endDocument( CPPUNIT_NS::XmlDocument *document );
|
||||
|
||||
void failTestAdded( CPPUNIT_NS::XmlDocument *document,
|
||||
CPPUNIT_NS::XmlElement *testElement,
|
||||
CPPUNIT_NS::Test *test,
|
||||
CPPUNIT_NS::TestFailure *failure );
|
||||
|
||||
void successfulTestAdded( CPPUNIT_NS::XmlDocument *document,
|
||||
CPPUNIT_NS::XmlElement *testElement,
|
||||
CPPUNIT_NS::Test *test );
|
||||
|
||||
void statisticsAdded( CPPUNIT_NS::XmlDocument *document,
|
||||
CPPUNIT_NS::XmlElement *statisticsElement );
|
||||
|
||||
private:
|
||||
/// Prevents the use of the copy constructor.
|
||||
ClockerXmlHook( const ClockerXmlHook &other );
|
||||
|
||||
/// Prevents the use of the copy operator.
|
||||
void operator =( const ClockerXmlHook &other );
|
||||
|
||||
void addTimedTest( CPPUNIT_NS::XmlElement *parentElement,
|
||||
int testIndex );
|
||||
|
||||
private:
|
||||
ClockerModel *m_model;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Inlines methods for ClockerXmlHook:
|
||||
// -----------------------------------
|
||||
|
||||
|
||||
|
||||
#endif // CLOCKERXMLHOOK_H
|
6
examples/ClockerPlugIn/Makefile.am
Normal file
6
examples/ClockerPlugIn/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
||||
EXTRA_DIST = WinNtTimer.h WinNtTimer.cpp ClockerPlugIn.dsp \
|
||||
Timer.h ClockerListener.h \
|
||||
Timer.cpp ClockerListener.cpp \
|
||||
ClockerPlugIn.cpp ClockerModel.h \
|
||||
ClockerModel.cpp ReadMe.txt \
|
||||
ClockerXmlHook.h ClockerXmlHook.cpp
|
359
examples/ClockerPlugIn/Makefile.in
Normal file
359
examples/ClockerPlugIn/Makefile.in
Normal file
@ -0,0 +1,359 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = examples/ClockerPlugIn
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/ac_create_prefix_config_h.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_sstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_strstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_namespaces.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_rtti.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_string_compare_string_first.m4 \
|
||||
$(top_srcdir)/config/ac_dll.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_gcc_abi_demangle.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_have_isfinite.m4 \
|
||||
$(top_srcdir)/config/bb_enable_doxygen.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPPUNIT_BINARY_AGE = @CPPUNIT_BINARY_AGE@
|
||||
CPPUNIT_INTERFACE_AGE = @CPPUNIT_INTERFACE_AGE@
|
||||
CPPUNIT_MAJOR_VERSION = @CPPUNIT_MAJOR_VERSION@
|
||||
CPPUNIT_MICRO_VERSION = @CPPUNIT_MICRO_VERSION@
|
||||
CPPUNIT_MINOR_VERSION = @CPPUNIT_MINOR_VERSION@
|
||||
CPPUNIT_VERSION = @CPPUNIT_VERSION@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOT = @DOT@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
enable_dot = @enable_dot@
|
||||
enable_html_docs = @enable_html_docs@
|
||||
enable_latex_docs = @enable_latex_docs@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = WinNtTimer.h WinNtTimer.cpp ClockerPlugIn.dsp \
|
||||
Timer.h ClockerListener.h \
|
||||
Timer.cpp ClockerListener.cpp \
|
||||
ClockerPlugIn.cpp ClockerModel.h \
|
||||
ClockerModel.cpp ReadMe.txt \
|
||||
ClockerXmlHook.h ClockerXmlHook.cpp
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/ClockerPlugIn/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu examples/ClockerPlugIn/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
44
examples/ClockerPlugIn/ReadMe.txt
Normal file
44
examples/ClockerPlugIn/ReadMe.txt
Normal file
@ -0,0 +1,44 @@
|
||||
A test plug-ins that track tests and test suites running time. It demonstrates
|
||||
TestListener, TestPlugIn, and XmlOutputterHook.
|
||||
|
||||
Both suite and test case times are tracked. The plug-in include in the XML
|
||||
output the TestPath of each test cases and its tracked time.
|
||||
|
||||
The timed test hierarchy is also included in the XML output. This way it is
|
||||
possible to see the time each suite takes to run.
|
||||
|
||||
|
||||
|
||||
* Usage:
|
||||
|
||||
Just add this plug-in to DllPlugInTester command line. It will add a test
|
||||
listener to track test time, and add a hook to the XmlOutputter to include
|
||||
test time to the XmlOutput.
|
||||
|
||||
If the option "text" is passed to the plug-in, the timed test tree will be
|
||||
printed to stdout.
|
||||
|
||||
DllPlugInRunnerd.exe ClockerPlugInd.dll
|
||||
or
|
||||
DllPlugInRunnerd.exe ClockerPlugInd.dll=text
|
||||
|
||||
* Example:
|
||||
|
||||
DllPlugInTesterd_dll.exe -x timed.xml ClockerPlugInd.dll CppUnitTestPlugInd.dll
|
||||
|
||||
Will track time of all tests contains in CppUnitTestPlugInd.dll and save the
|
||||
result in timed.xml.
|
||||
|
||||
* Notes:
|
||||
|
||||
The id of the <TimedTestTree> are different than those of the
|
||||
<SuccessfulTests> and <FailedTests> trees. You can use the <TestPath> to
|
||||
cross-reference the datas.
|
||||
|
||||
* Remarks:
|
||||
|
||||
You may want to review ClockerModel before using this plug-in for serious
|
||||
purpose, add timing based on the process cpu time.
|
||||
|
||||
A version is provided for NT that use the main thread cpu time. This is an issue
|
||||
if the test cases are multithreaded.
|
28
examples/ClockerPlugIn/Timer.cpp
Normal file
28
examples/ClockerPlugIn/Timer.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Implementation file Timer.cpp for class Timer
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/04/19
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Timer.h"
|
||||
|
||||
|
||||
void
|
||||
Timer::start()
|
||||
{
|
||||
m_beginTime = clock();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Timer::finish()
|
||||
{
|
||||
m_elapsedTime = double(clock() - m_beginTime) / CLOCKS_PER_SEC;
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
Timer::elapsedTime() const
|
||||
{
|
||||
return m_elapsedTime;
|
||||
}
|
32
examples/ClockerPlugIn/Timer.h
Normal file
32
examples/ClockerPlugIn/Timer.h
Normal file
@ -0,0 +1,32 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Header file Timer.h for class Timer
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/04/19
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#ifndef TIMER_H
|
||||
#define TIMER_H
|
||||
|
||||
#include <time.h>
|
||||
|
||||
/// A Timer.
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
void start();
|
||||
void finish();
|
||||
|
||||
double elapsedTime() const;
|
||||
|
||||
private:
|
||||
clock_t m_beginTime;
|
||||
double m_elapsedTime;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Inlines methods for Timer:
|
||||
// --------------------------
|
||||
|
||||
|
||||
|
||||
#endif // TIMER_H
|
77
examples/ClockerPlugIn/WinNtTimer.cpp
Normal file
77
examples/ClockerPlugIn/WinNtTimer.cpp
Normal file
@ -0,0 +1,77 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Implementation file WinNtTimer.cpp for class WinNtTimer
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/04/19
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "WinNtTimer.h"
|
||||
|
||||
|
||||
/*! Returns time spent in the thread.
|
||||
* @param rquadTime Receive the time spent in the thread (user+kernel time)
|
||||
* in unit of 100 nano-seconds.
|
||||
* In pratice, the effective resolution is 10ms !!!
|
||||
*
|
||||
* @return \c true if sucess, \c false otherwise.
|
||||
*/
|
||||
static bool
|
||||
GetThreadSpentTime( LONGLONG &rquadTime )
|
||||
{
|
||||
FILETIME timeCreation;
|
||||
FILETIME timeExit;
|
||||
FILETIME timeKernel;
|
||||
FILETIME timeUser;
|
||||
if ( !::GetThreadTimes( ::GetCurrentThread(),
|
||||
&timeCreation,
|
||||
&timeExit,
|
||||
&timeKernel,
|
||||
&timeUser) )
|
||||
{
|
||||
rquadTime = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
LARGE_INTEGER lintKernel;
|
||||
lintKernel.LowPart = timeKernel.dwLowDateTime;
|
||||
lintKernel.HighPart = timeKernel.dwHighDateTime;
|
||||
|
||||
LARGE_INTEGER lintUser;
|
||||
lintUser.LowPart = timeUser.dwLowDateTime;
|
||||
lintUser.HighPart = timeUser.dwHighDateTime;
|
||||
|
||||
rquadTime = lintKernel.QuadPart + lintUser.QuadPart;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
WinNtTimer::start()
|
||||
{
|
||||
m_isValid = GetThreadSpentTime( m_beginTime );
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WinNtTimer::finish()
|
||||
{
|
||||
LONGLONG quadTimeEnd;
|
||||
LONGLONG quadProcessedElapse;
|
||||
m_isValid = m_isValid && GetThreadSpentTime( quadTimeEnd );
|
||||
if ( m_isValid )
|
||||
{
|
||||
quadProcessedElapse = quadTimeEnd - m_beginTime;
|
||||
m_elapsedTime = double(quadProcessedElapse) / 10000000;
|
||||
}
|
||||
else
|
||||
m_elapsedTime = -1;
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
WinNtTimer::elapsedTime() const
|
||||
{
|
||||
return m_elapsedTime;
|
||||
}
|
36
examples/ClockerPlugIn/WinNtTimer.h
Normal file
36
examples/ClockerPlugIn/WinNtTimer.h
Normal file
@ -0,0 +1,36 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Header file WinNtTimer.h for class WinNtTimer
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/04/19
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#ifndef WINNTTIMER_H
|
||||
#define WINNTTIMER_H
|
||||
|
||||
#include <windows.h>
|
||||
#include <winnt.h>
|
||||
#include <winbase.h>
|
||||
|
||||
|
||||
/// A Timer.
|
||||
class WinNtTimer
|
||||
{
|
||||
public:
|
||||
void start();
|
||||
void finish();
|
||||
|
||||
double elapsedTime() const;
|
||||
|
||||
private:
|
||||
LONGLONG m_beginTime;
|
||||
double m_elapsedTime;
|
||||
bool m_isValid;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Inlines methods for Timer:
|
||||
// --------------------------
|
||||
|
||||
|
||||
|
||||
#endif // WINNTTIMER_H
|
121
examples/DumperPlugIn/DumperListener.cpp
Normal file
121
examples/DumperPlugIn/DumperListener.cpp
Normal file
@ -0,0 +1,121 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Implementation file DumperListener.cpp for class DumperListener
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/04/19
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#include <cppunit/Test.h>
|
||||
#include <cppunit/portability/Stream.h>
|
||||
#include "DumperListener.h"
|
||||
|
||||
DumperListener::DumperListener( bool flatten )
|
||||
: m_flatten( flatten )
|
||||
, m_suiteCount( 0 )
|
||||
, m_testCount( 0 )
|
||||
, m_suiteWithTestCount( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
DumperListener::~DumperListener()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DumperListener::startTest( CPPUNIT_NS::Test *test )
|
||||
{
|
||||
printPath( test, false );
|
||||
++m_testCount;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DumperListener::endTest( CPPUNIT_NS::Test *test )
|
||||
{
|
||||
m_path.up();
|
||||
if ( !m_suiteHasTest.empty() )
|
||||
{
|
||||
m_suiteHasTest.pop();
|
||||
m_suiteHasTest.push( true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DumperListener::startSuite( CPPUNIT_NS::Test *suite )
|
||||
{
|
||||
printPath( suite, true );
|
||||
++m_suiteCount;
|
||||
m_suiteHasTest.push( false );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DumperListener::endSuite( CPPUNIT_NS::Test *suite )
|
||||
{
|
||||
m_path.up();
|
||||
if ( m_suiteHasTest.top() )
|
||||
++m_suiteWithTestCount;
|
||||
m_suiteHasTest.pop();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DumperListener::endTestRun( CPPUNIT_NS::Test *test,
|
||||
CPPUNIT_NS::TestResult *eventManager )
|
||||
{
|
||||
double average = 0;
|
||||
if ( m_suiteWithTestCount > 0 )
|
||||
average = double(m_testCount) / m_suiteWithTestCount;
|
||||
|
||||
CPPUNIT_NS::stdCOut()
|
||||
<< "Statistics: " << m_testCount << " test cases, "
|
||||
<< m_suiteCount << " suites, "
|
||||
<< average << " test cases / suite with test cases"
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DumperListener::printPath( CPPUNIT_NS::Test *test,
|
||||
bool isSuite )
|
||||
{
|
||||
m_path.add( test );
|
||||
|
||||
if ( m_flatten )
|
||||
printFlattenedPath( isSuite );
|
||||
else
|
||||
printIndentedPathChild();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DumperListener::printFlattenedPath( bool isSuite )
|
||||
{
|
||||
std::string path = m_path.toString();
|
||||
if ( isSuite )
|
||||
path += "/";
|
||||
CPPUNIT_NS::stdCOut() << path << "\n";
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DumperListener::printIndentedPathChild()
|
||||
{
|
||||
std::string indent = makeIndentString( m_path.getTestCount() -1 );
|
||||
CPPUNIT_NS::stdCOut() << indent << m_path.getChildTest()->getName() << "\n";
|
||||
}
|
||||
|
||||
|
||||
std::string
|
||||
DumperListener::makeIndentString( int indentLevel )
|
||||
{
|
||||
std::string indent;
|
||||
for ( int parentIndent =0; parentIndent < indentLevel-1; ++parentIndent )
|
||||
indent += "| ";
|
||||
|
||||
if ( indentLevel > 0 )
|
||||
indent += "+--";
|
||||
|
||||
return indent;
|
||||
}
|
67
examples/DumperPlugIn/DumperListener.h
Normal file
67
examples/DumperPlugIn/DumperListener.h
Normal file
@ -0,0 +1,67 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Header file DumperListener.h for class DumperListener
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/04/19
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#ifndef DUMPERLISTENER_H
|
||||
#define DUMPERLISTENER_H
|
||||
|
||||
#include <cppunit/portability/CppUnitStack.h>
|
||||
#include <cppunit/TestListener.h>
|
||||
#include <cppunit/TestPath.h>
|
||||
|
||||
|
||||
/// TestListener that prints a flatten or hierarchical view of the test tree.
|
||||
class DumperListener : public CPPUNIT_NS::TestListener
|
||||
{
|
||||
public:
|
||||
DumperListener( bool flatten );
|
||||
|
||||
virtual ~DumperListener();
|
||||
|
||||
void startTest( CPPUNIT_NS::Test *test );
|
||||
|
||||
void endTest( CPPUNIT_NS::Test *test );
|
||||
|
||||
void startSuite( CPPUNIT_NS::Test *suite );
|
||||
|
||||
void endSuite( CPPUNIT_NS::Test *suite );
|
||||
|
||||
void endTestRun( CPPUNIT_NS::Test *test,
|
||||
CPPUNIT_NS::TestResult *eventManager );
|
||||
|
||||
private:
|
||||
/// Prevents the use of the copy constructor.
|
||||
DumperListener( const DumperListener &other );
|
||||
|
||||
/// Prevents the use of the copy operator.
|
||||
void operator =( const DumperListener &other );
|
||||
|
||||
void printPath( CPPUNIT_NS::Test *test,
|
||||
bool isSuite );
|
||||
|
||||
void printFlattenedPath( bool isSuite );
|
||||
|
||||
void printIndentedPathChild();
|
||||
|
||||
std::string makeIndentString( int indentLevel );
|
||||
|
||||
private:
|
||||
bool m_flatten;
|
||||
CPPUNIT_NS::TestPath m_path;
|
||||
|
||||
int m_suiteCount;
|
||||
int m_testCount;
|
||||
int m_suiteWithTestCount;
|
||||
|
||||
CppUnitStack<bool> m_suiteHasTest;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Inlines methods for DumperListener:
|
||||
// -----------------------------------
|
||||
|
||||
|
||||
|
||||
#endif // DUMPERLISTENER_H
|
65
examples/DumperPlugIn/DumperPlugIn.cpp
Normal file
65
examples/DumperPlugIn/DumperPlugIn.cpp
Normal file
@ -0,0 +1,65 @@
|
||||
#include <cppunit/TestResult.h>
|
||||
#include <cppunit/plugin/TestPlugIn.h>
|
||||
#include "DumperListener.h"
|
||||
|
||||
|
||||
|
||||
class DumperPlugIn : public CppUnitTestPlugIn
|
||||
{
|
||||
public:
|
||||
DumperPlugIn()
|
||||
: m_dumper( NULL )
|
||||
{
|
||||
}
|
||||
|
||||
~DumperPlugIn()
|
||||
{
|
||||
delete m_dumper;
|
||||
}
|
||||
|
||||
|
||||
void initialize( CPPUNIT_NS::TestFactoryRegistry *registry,
|
||||
const CPPUNIT_NS::PlugInParameters ¶meters )
|
||||
{
|
||||
bool flatten = false;
|
||||
if ( parameters.getCommandLine() == "flat" )
|
||||
flatten = true;
|
||||
|
||||
m_dumper = new DumperListener( flatten );
|
||||
}
|
||||
|
||||
|
||||
void addListener( CPPUNIT_NS::TestResult *eventManager )
|
||||
{
|
||||
eventManager->addListener( m_dumper );
|
||||
}
|
||||
|
||||
|
||||
void removeListener( CPPUNIT_NS::TestResult *eventManager )
|
||||
{
|
||||
eventManager->removeListener( m_dumper );
|
||||
}
|
||||
|
||||
|
||||
void addXmlOutputterHooks( CPPUNIT_NS::XmlOutputter *outputter )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void removeXmlOutputterHooks()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void uninitialize( CPPUNIT_NS::TestFactoryRegistry *registry )
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
DumperListener *m_dumper;
|
||||
};
|
||||
|
||||
|
||||
CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( DumperPlugIn );
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT_MAIN();
|
108
examples/DumperPlugIn/DumperPlugIn.dsp
Normal file
108
examples/DumperPlugIn/DumperPlugIn.dsp
Normal file
@ -0,0 +1,108 @@
|
||||
# Microsoft Developer Studio Project File - Name="DumperPlugIn" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=DumperPlugIn - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "DumperPlugIn.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "DumperPlugIn.mak" CFG="DumperPlugIn - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "DumperPlugIn - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "DumperPlugIn - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "DumperPlugIn - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DUMPERPLUGIN_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GR /GX /Zd /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DUMPERPLUGIN_EXPORTS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunit_dll.lib /nologo /dll /machine:I386 /out:"../../lib/DumperPlugIn.dll" /libpath:"../../lib/"
|
||||
# SUBTRACT LINK32 /incremental:yes
|
||||
|
||||
!ELSEIF "$(CFG)" == "DumperPlugIn - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DUMPERPLUGIN_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DUMPERPLUGIN_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"../../lib/DumperPlugInd.dll" /pdbtype:sept /libpath:"../../lib/"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "DumperPlugIn - Win32 Release"
|
||||
# Name "DumperPlugIn - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DumperListener.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DumperListener.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DumperPlugIn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Makefile.am
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
2
examples/DumperPlugIn/Makefile.am
Normal file
2
examples/DumperPlugIn/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
||||
EXTRA_DIST = DumperListener.h DumperListener.cpp DumperPlugIn.cpp \
|
||||
DumperPlugIn.dsp
|
355
examples/DumperPlugIn/Makefile.in
Normal file
355
examples/DumperPlugIn/Makefile.in
Normal file
@ -0,0 +1,355 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = examples/DumperPlugIn
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/ac_create_prefix_config_h.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_sstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_strstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_namespaces.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_rtti.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_string_compare_string_first.m4 \
|
||||
$(top_srcdir)/config/ac_dll.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_gcc_abi_demangle.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_have_isfinite.m4 \
|
||||
$(top_srcdir)/config/bb_enable_doxygen.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPPUNIT_BINARY_AGE = @CPPUNIT_BINARY_AGE@
|
||||
CPPUNIT_INTERFACE_AGE = @CPPUNIT_INTERFACE_AGE@
|
||||
CPPUNIT_MAJOR_VERSION = @CPPUNIT_MAJOR_VERSION@
|
||||
CPPUNIT_MICRO_VERSION = @CPPUNIT_MICRO_VERSION@
|
||||
CPPUNIT_MINOR_VERSION = @CPPUNIT_MINOR_VERSION@
|
||||
CPPUNIT_VERSION = @CPPUNIT_VERSION@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOT = @DOT@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
enable_dot = @enable_dot@
|
||||
enable_html_docs = @enable_html_docs@
|
||||
enable_latex_docs = @enable_latex_docs@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = DumperListener.h DumperListener.cpp DumperPlugIn.cpp \
|
||||
DumperPlugIn.dsp
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/DumperPlugIn/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu examples/DumperPlugIn/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
7
examples/Makefile.am
Normal file
7
examples/Makefile.am
Normal file
@ -0,0 +1,7 @@
|
||||
SUBDIRS = hierarchy cppunittest simple ClockerPlugIn DumperPlugIn money
|
||||
|
||||
# No dist subdir for msvc6: is handled by toplevel dist-hook
|
||||
# DIST_SUBDIRS = msvc6
|
||||
|
||||
EXTRA_DIST = examples.dsw examples.opt
|
||||
|
515
examples/Makefile.in
Normal file
515
examples/Makefile.in
Normal file
@ -0,0 +1,515 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = examples
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/ac_create_prefix_config_h.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_sstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_strstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_namespaces.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_rtti.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_string_compare_string_first.m4 \
|
||||
$(top_srcdir)/config/ac_dll.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_gcc_abi_demangle.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_have_isfinite.m4 \
|
||||
$(top_srcdir)/config/bb_enable_doxygen.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPPUNIT_BINARY_AGE = @CPPUNIT_BINARY_AGE@
|
||||
CPPUNIT_INTERFACE_AGE = @CPPUNIT_INTERFACE_AGE@
|
||||
CPPUNIT_MAJOR_VERSION = @CPPUNIT_MAJOR_VERSION@
|
||||
CPPUNIT_MICRO_VERSION = @CPPUNIT_MICRO_VERSION@
|
||||
CPPUNIT_MINOR_VERSION = @CPPUNIT_MINOR_VERSION@
|
||||
CPPUNIT_VERSION = @CPPUNIT_VERSION@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOT = @DOT@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
enable_dot = @enable_dot@
|
||||
enable_html_docs = @enable_html_docs@
|
||||
enable_latex_docs = @enable_latex_docs@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = hierarchy cppunittest simple ClockerPlugIn DumperPlugIn money
|
||||
|
||||
# No dist subdir for msvc6: is handled by toplevel dist-hook
|
||||
# DIST_SUBDIRS = msvc6
|
||||
EXTRA_DIST = examples.dsw examples.opt
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu examples/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am check check-am clean clean-generic clean-libtool \
|
||||
ctags ctags-recursive distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
37
examples/cppunittest/BaseTestCase.cpp
Normal file
37
examples/cppunittest/BaseTestCase.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
#include <cppunit/config/SourcePrefix.h>
|
||||
#include "BaseTestCase.h"
|
||||
|
||||
|
||||
BaseTestCase::BaseTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseTestCase::~BaseTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BaseTestCase::setUp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BaseTestCase::tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BaseTestCase::testUsingCheckIt()
|
||||
{
|
||||
checkIt();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BaseTestCase::checkIt()
|
||||
{
|
||||
}
|
32
examples/cppunittest/BaseTestCase.h
Normal file
32
examples/cppunittest/BaseTestCase.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef BASETESTCASE_H
|
||||
#define BASETESTCASE_H
|
||||
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
|
||||
class BaseTestCase : public CPPUNIT_NS::TestCase
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( BaseTestCase );
|
||||
CPPUNIT_TEST( testUsingCheckIt );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
BaseTestCase();
|
||||
virtual ~BaseTestCase();
|
||||
|
||||
virtual void setUp();
|
||||
virtual void tearDown();
|
||||
|
||||
void testUsingCheckIt();
|
||||
|
||||
protected:
|
||||
virtual void checkIt();
|
||||
|
||||
private:
|
||||
BaseTestCase( const BaseTestCase © );
|
||||
void operator =( const BaseTestCase © );
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // BASETESTCASE_H
|
12
examples/cppunittest/CoreSuite.h
Normal file
12
examples/cppunittest/CoreSuite.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef CPPUNITTEST_CORESUITE_H
|
||||
#define CPPUNITTEST_CORESUITE_H
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
#include <string>
|
||||
|
||||
inline std::string coreSuiteName()
|
||||
{
|
||||
return "Core";
|
||||
}
|
||||
|
||||
#endif // CPPUNITTEST_CORESUITE_H
|
66
examples/cppunittest/CppUnitTestMain.cpp
Normal file
66
examples/cppunittest/CppUnitTestMain.cpp
Normal file
@ -0,0 +1,66 @@
|
||||
#include <cppunit/CompilerOutputter.h>
|
||||
#include <cppunit/TestResult.h>
|
||||
#include <cppunit/TestResultCollector.h>
|
||||
#include <cppunit/TestRunner.h>
|
||||
#include <cppunit/TextTestProgressListener.h>
|
||||
#include <cppunit/BriefTestProgressListener.h>
|
||||
#include <cppunit/XmlOutputter.h>
|
||||
#include <cppunit/extensions/TestFactoryRegistry.h>
|
||||
#include <stdexcept>
|
||||
#include <fstream>
|
||||
|
||||
|
||||
int
|
||||
main( int argc, char* argv[] )
|
||||
{
|
||||
// Retreive test path from command line first argument. Default to "" which resolve
|
||||
// to the top level suite.
|
||||
std::string testPath = (argc > 1) ? std::string(argv[1]) : std::string("");
|
||||
|
||||
// Create the event manager and test controller
|
||||
CPPUNIT_NS::TestResult controller;
|
||||
|
||||
// Add a listener that colllects test result
|
||||
CPPUNIT_NS::TestResultCollector result;
|
||||
controller.addListener( &result );
|
||||
|
||||
// Add a listener that print dots as test run.
|
||||
#ifdef WIN32
|
||||
CPPUNIT_NS::TextTestProgressListener progress;
|
||||
#else
|
||||
CPPUNIT_NS::BriefTestProgressListener progress;
|
||||
#endif
|
||||
controller.addListener( &progress );
|
||||
|
||||
// Add the top suite to the test runner
|
||||
CPPUNIT_NS::TestRunner runner;
|
||||
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
|
||||
try
|
||||
{
|
||||
CPPUNIT_NS::stdCOut() << "Running " << testPath;
|
||||
runner.run( controller, testPath );
|
||||
|
||||
CPPUNIT_NS::stdCOut() << "\n";
|
||||
|
||||
// Print test in a compiler compatible format.
|
||||
CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
|
||||
outputter.write();
|
||||
|
||||
// Uncomment this for XML output
|
||||
// std::ofstream file( "tests.xml" );
|
||||
// CPPUNIT_NS::XmlOutputter xml( &result, file );
|
||||
// xml.setStyleSheet( "report.xsl" );
|
||||
// xml.write();
|
||||
// file.close();
|
||||
}
|
||||
catch ( std::invalid_argument &e ) // Test path not resolved
|
||||
{
|
||||
CPPUNIT_NS::stdCOut() << "\n"
|
||||
<< "ERROR: " << e.what()
|
||||
<< "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
return result.wasSuccessful() ? 0 : 1;
|
||||
}
|
||||
|
546
examples/cppunittest/CppUnitTestMain.dsp
Normal file
546
examples/cppunittest/CppUnitTestMain.dsp
Normal file
@ -0,0 +1,546 @@
|
||||
# Microsoft Developer Studio Project File - Name="CppUnitTestMain" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=CppUnitTestMain - Win32 Debug DLL
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "CppUnitTestMain.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "CppUnitTestMain.mak" CFG="CppUnitTestMain - Win32 Debug DLL"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "CppUnitTestMain - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "CppUnitTestMain - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "CppUnitTestMain - Win32 Release DLL" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "CppUnitTestMain - Win32 Debug DLL" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "CppUnitTestMain - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GR /GX /Zd /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunit.lib /nologo /subsystem:console /machine:I386 /libpath:"../../lib/"
|
||||
# SUBTRACT LINK32 /incremental:yes
|
||||
# Begin Special Build Tool
|
||||
TargetPath=.\Release\CppUnitTestMain.exe
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Self test
|
||||
PostBuild_Cmds="$(TargetPath)"
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestMain - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"../../lib/"
|
||||
# Begin Special Build Tool
|
||||
TargetPath=.\Debug\CppUnitTestMain.exe
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Self test
|
||||
PostBuild_Cmds="$(TargetPath)"
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestMain - Win32 Release DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "CppUnitTestMain___Win32_Release_DLL"
|
||||
# PROP BASE Intermediate_Dir "CppUnitTestMain___Win32_Release_DLL"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "ReleaseDLL"
|
||||
# PROP Intermediate_Dir "ReleaseDLL"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GR /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "CPPUNIT_USE_TYPEINFO" /FD /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MD /W3 /GR /GX /Zd /Ox /Ot /Oa /Ow /Og /Oi /Op /Ob0 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "CPPUNIT_DLL" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../lib/cppunit.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunit_dll.lib /nologo /subsystem:console /machine:I386 /libpath:"../../lib/"
|
||||
# SUBTRACT LINK32 /incremental:yes
|
||||
# Begin Special Build Tool
|
||||
TargetPath=.\ReleaseDLL\CppUnitTestMain.exe
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Self test
|
||||
PostBuild_Cmds=$(TargetPath)
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestMain - Win32 Debug DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "CppUnitTestMain___Win32_Debug_DLL"
|
||||
# PROP BASE Intermediate_Dir "CppUnitTestMain___Win32_Debug_DLL"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "DebugDLL"
|
||||
# PROP Intermediate_Dir "DebugDLL"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "CPPUNIT_DLL" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../lib/cppunitd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"../../lib/"
|
||||
# Begin Special Build Tool
|
||||
TargetPath=.\DebugDLL\CppUnitTestMain.exe
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Self test
|
||||
PostBuild_Cmds=$(TargetPath)
|
||||
# End Special Build Tool
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "CppUnitTestMain - Win32 Release"
|
||||
# Name "CppUnitTestMain - Win32 Debug"
|
||||
# Name "CppUnitTestMain - Win32 Release DLL"
|
||||
# Name "CppUnitTestMain - Win32 Debug DLL"
|
||||
# Begin Group "Tests"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Group "Core"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\assertion_traitsTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\assertion_traitsTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MessageTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MessageTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestAssertTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestAssertTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestCallerTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestCallerTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestCaseTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestCaseTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestFailureTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestFailureTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestPathTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestPathTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestResultTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestResultTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestSuiteTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestSuiteTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "UnitTestTools"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlUniformiser.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlUniformiser.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlUniformiserTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlUniformiserTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Helper"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\HelperMacrosTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\HelperMacrosTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Extension"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionTestCaseDecoratorTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionTestCaseDecoratorTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\OrthodoxTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\OrthodoxTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RepeatedTestTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RepeatedTestTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestDecoratorTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestDecoratorTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestSetUpTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestSetUpTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Output"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestResultCollectorTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestResultCollectorTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlOutputterTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlOutputterTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Tools"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StringToolsTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StringToolsTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlElementTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlElementTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Group
|
||||
# Begin Group "TestSupport"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BaseTestCase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BaseTestCase.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FailureException.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockFunctor.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockProtector.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockTestCase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockTestCase.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockTestListener.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockTestListener.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SubclassedTestCase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SubclassedTestCase.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SynchronizedTestResult.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TrackedTestCase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TrackedTestCase.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Suites"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CoreSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CppUnitTestSuite.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExtensionSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\HelperSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\OutputSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ToolsSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\UnitTestToolSuite.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\lib\cppunit_dll.dll
|
||||
|
||||
!IF "$(CFG)" == "CppUnitTestMain - Win32 Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestMain - Win32 Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestMain - Win32 Release DLL"
|
||||
|
||||
# Begin Custom Build - Updating DLL: $(InputPath)
|
||||
IntDir=.\ReleaseDLL
|
||||
InputPath=..\..\lib\cppunit_dll.dll
|
||||
InputName=cppunit_dll
|
||||
|
||||
"$(IntDir)\$(InputName).dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
copy "$(InputPath)" "$(IntDir)\$(InputName).dll"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestMain - Win32 Debug DLL"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\lib\cppunitd_dll.dll
|
||||
|
||||
!IF "$(CFG)" == "CppUnitTestMain - Win32 Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestMain - Win32 Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestMain - Win32 Release DLL"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestMain - Win32 Debug DLL"
|
||||
|
||||
# Begin Custom Build - Updating DLL: $(InputPath)
|
||||
IntDir=.\DebugDLL
|
||||
InputPath=..\..\lib\cppunitd_dll.dll
|
||||
InputName=cppunitd_dll
|
||||
|
||||
"$(IntDir)\$(InputName).dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
copy "$(InputPath)" "$(IntDir)\$(InputName).dll"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CppUnitTestMain.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Makefile.am
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
59
examples/cppunittest/CppUnitTestMain.dsw
Normal file
59
examples/cppunittest/CppUnitTestMain.dsw
Normal file
@ -0,0 +1,59 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "CppUnitTestMain"=.\CppUnitTestMain.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name cppunit
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name cppunit_dll
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "cppunit"=..\..\src\cppunit\cppunit.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "cppunit_dll"=..\..\SRC\CPPUNIT\cppunit_dll.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
5
examples/cppunittest/CppUnitTestPlugIn.cpp
Normal file
5
examples/cppunittest/CppUnitTestPlugIn.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include <cppunit/plugin/TestPlugIn.h>
|
||||
|
||||
|
||||
// Implements all the plug-in stuffs, WinMain...
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
396
examples/cppunittest/CppUnitTestPlugIn.dsp
Normal file
396
examples/cppunittest/CppUnitTestPlugIn.dsp
Normal file
@ -0,0 +1,396 @@
|
||||
# Microsoft Developer Studio Project File - Name="CppUnitTestPlugIn" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=CppUnitTestPlugIn - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "CppUnitTestPlugIn.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "CppUnitTestPlugIn.mak" CFG="CppUnitTestPlugIn - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "CppUnitTestPlugIn - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "CppUnitTestPlugIn - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "CppUnitTestPlugIn - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "ReleasePlugIn"
|
||||
# PROP Intermediate_Dir "ReleasePlugIn"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNITTESTPLUGIN_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GR /GX /Zd /O2 /I "../../include" /D "NDEBUG" /D "CPPUNITTESTPLUGIN_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunit_dll.lib /nologo /dll /machine:I386 /libpath:"../../lib/"
|
||||
# SUBTRACT LINK32 /incremental:yes
|
||||
|
||||
!ELSEIF "$(CFG)" == "CppUnitTestPlugIn - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "DebugPlugIn"
|
||||
# PROP Intermediate_Dir "DebugPlugIn"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNITTESTPLUGIN_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../include" /D "_DEBUG" /D "CPPUNIT_DLL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"DebugPlugIn/CppUnitTestPlugInd.dll" /pdbtype:sept /libpath:"../../lib/"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "CppUnitTestPlugIn - Win32 Release"
|
||||
# Name "CppUnitTestPlugIn - Win32 Debug"
|
||||
# Begin Group "Suites"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CoreSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CppUnitTestSuite.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CppUnitTestSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExtensionSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\HelperSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\OutputSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ToolsSuite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\UnitTestToolSuite.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "TestSupport"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BaseTestCase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BaseTestCase.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FailureException.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockFunctor.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockProtector.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockTestCase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockTestCase.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockTestListener.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MockTestListener.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SubclassedTestCase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SubclassedTestCase.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SynchronizedTestResult.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TrackedTestCase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TrackedTestCase.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Tests"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Group "Core"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MessageTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MessageTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestAssertTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestAssertTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestCallerTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestCallerTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestCaseTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestCaseTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestFailureTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestFailureTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestPathTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestPathTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestResultTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestResultTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestSuiteTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestSuiteTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "UnitTestTools"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlUniformiser.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlUniformiser.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlUniformiserTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlUniformiserTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Helper"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\HelperMacrosTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\HelperMacrosTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Extension"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionTestCaseDecoratorTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ExceptionTestCaseDecoratorTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\OrthodoxTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\OrthodoxTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RepeatedTestTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RepeatedTestTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestDecoratorTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestDecoratorTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestSetUpTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestSetUpTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Output"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestResultCollectorTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TestResultCollectorTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlOutputterTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlOutputterTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Tools"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StringToolsTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StringToolsTest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlElementTest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlElementTest.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CppUnitTestPlugIn.cpp
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
15
examples/cppunittest/CppUnitTestSuite.cpp
Normal file
15
examples/cppunittest/CppUnitTestSuite.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include <cppunit/config/SourcePrefix.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include "CoreSuite.h"
|
||||
#include "HelperSuite.h"
|
||||
#include "ExtensionSuite.h"
|
||||
#include "OutputSuite.h"
|
||||
#include "ToolsSuite.h"
|
||||
#include "UnitTestToolSuite.h"
|
||||
|
||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT( coreSuiteName() );
|
||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT( extensionSuiteName() );
|
||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT( helperSuiteName() );
|
||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT( outputSuiteName() );
|
||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT( toolsSuiteName() );
|
||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT( unitTestToolSuiteName() );
|
95
examples/cppunittest/ExceptionTest.cpp
Normal file
95
examples/cppunittest/ExceptionTest.cpp
Normal file
@ -0,0 +1,95 @@
|
||||
#include "CoreSuite.h"
|
||||
#include "ExceptionTest.h"
|
||||
#include <cppunit/Exception.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ExceptionTest,
|
||||
coreSuiteName() );
|
||||
|
||||
|
||||
ExceptionTest::ExceptionTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ExceptionTest::~ExceptionTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTest::setUp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTest::tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTest::testConstructor()
|
||||
{
|
||||
const CPPUNIT_NS::Message message( "a message" );
|
||||
const CPPUNIT_NS::SourceLine sourceLine( "dir/afile.cpp", 17 );
|
||||
|
||||
CPPUNIT_NS::Exception e( message, sourceLine );
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( message.shortDescription(), e.message().shortDescription() );
|
||||
CPPUNIT_ASSERT( sourceLine == e.sourceLine() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTest::testDefaultConstructor()
|
||||
{
|
||||
CPPUNIT_NS::Exception e;
|
||||
|
||||
CPPUNIT_ASSERT( CPPUNIT_NS::Message() == e.message() );
|
||||
CPPUNIT_ASSERT( !e.sourceLine().isValid() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTest::testCopyConstructor()
|
||||
{
|
||||
CPPUNIT_NS::SourceLine sourceLine( "fileName.cpp", 123 );
|
||||
CPPUNIT_NS::Exception e( CPPUNIT_NS::Message("message"), sourceLine );
|
||||
CPPUNIT_NS::Exception other( e );
|
||||
checkIsSame( e, other );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTest::testAssignment()
|
||||
{
|
||||
CPPUNIT_NS::SourceLine sourceLine( "fileName.cpp", 123 );
|
||||
CPPUNIT_NS::Exception e( CPPUNIT_NS::Message("message"), sourceLine );
|
||||
CPPUNIT_NS::Exception other;
|
||||
other = e;
|
||||
checkIsSame( e, other );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTest::testClone()
|
||||
{
|
||||
CPPUNIT_NS::SourceLine sourceLine( "fileName.cpp", 123 );
|
||||
CPPUNIT_NS::Exception e( CPPUNIT_NS::Message("message"), sourceLine );
|
||||
std::auto_ptr<CPPUNIT_NS::Exception> other( e.clone() );
|
||||
checkIsSame( e, *other.get() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTest::checkIsSame( CPPUNIT_NS::Exception &e,
|
||||
CPPUNIT_NS::Exception &other )
|
||||
{
|
||||
std::string eWhat( e.what() );
|
||||
std::string otherWhat( other.what() );
|
||||
CPPUNIT_ASSERT_EQUAL( eWhat, otherWhat );
|
||||
CPPUNIT_ASSERT( e.sourceLine() == other.sourceLine() );
|
||||
}
|
41
examples/cppunittest/ExceptionTest.h
Normal file
41
examples/cppunittest/ExceptionTest.h
Normal file
@ -0,0 +1,41 @@
|
||||
#ifndef EXCEPTIONTEST_H
|
||||
#define EXCEPTIONTEST_H
|
||||
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
|
||||
class ExceptionTest : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( ExceptionTest );
|
||||
CPPUNIT_TEST( testConstructor );
|
||||
CPPUNIT_TEST( testDefaultConstructor );
|
||||
CPPUNIT_TEST( testCopyConstructor );
|
||||
CPPUNIT_TEST( testAssignment );
|
||||
CPPUNIT_TEST( testClone );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
ExceptionTest();
|
||||
virtual ~ExceptionTest();
|
||||
|
||||
virtual void setUp();
|
||||
virtual void tearDown();
|
||||
|
||||
void testConstructor();
|
||||
void testDefaultConstructor();
|
||||
void testCopyConstructor();
|
||||
void testAssignment();
|
||||
void testClone();
|
||||
|
||||
private:
|
||||
ExceptionTest( const ExceptionTest © );
|
||||
void operator =( const ExceptionTest © );
|
||||
void checkIsSame( CPPUNIT_NS::Exception &e,
|
||||
CPPUNIT_NS::Exception &other );
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // EXCEPTIONTEST_H
|
71
examples/cppunittest/ExceptionTestCaseDecoratorTest.cpp
Normal file
71
examples/cppunittest/ExceptionTestCaseDecoratorTest.cpp
Normal file
@ -0,0 +1,71 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Implementation file ExceptionTestCaseDecoratorTest.cpp for class ExceptionTestCaseDecoratorTest
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/08/03
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "ExtensionSuite.h"
|
||||
#include "ExceptionTestCaseDecoratorTest.h"
|
||||
|
||||
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ExceptionTestCaseDecoratorTest,
|
||||
extensionSuiteName() );
|
||||
|
||||
|
||||
ExceptionTestCaseDecoratorTest::ExceptionTestCaseDecoratorTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ExceptionTestCaseDecoratorTest::~ExceptionTestCaseDecoratorTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTestCaseDecoratorTest::setUp()
|
||||
{
|
||||
m_testListener = new MockTestListener( "mock-testlistener" );
|
||||
m_result = new CPPUNIT_NS::TestResult();
|
||||
m_result->addListener( m_testListener );
|
||||
|
||||
m_test = new MockTestCase( "mock-decorated-testcase" );
|
||||
m_decorator = new FailureExceptionTestCase( m_test );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTestCaseDecoratorTest::tearDown()
|
||||
{
|
||||
delete m_decorator;
|
||||
delete m_result;
|
||||
delete m_testListener;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTestCaseDecoratorTest::testNoExceptionThrownFailed()
|
||||
{
|
||||
m_testListener->setExpectedAddFailureCall(1);
|
||||
m_test->setExpectedSetUpCall();
|
||||
m_test->setExpectedRunTestCall();
|
||||
m_test->setExpectedTearDownCall();
|
||||
|
||||
m_decorator->run( m_result );
|
||||
|
||||
m_testListener->verify();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExceptionTestCaseDecoratorTest::testExceptionThrownPass()
|
||||
{
|
||||
m_testListener->setExpectNoFailure();
|
||||
m_test->setExpectedSetUpCall();
|
||||
m_test->setExpectedRunTestCall();
|
||||
m_test->setExpectedTearDownCall();
|
||||
m_test->makeRunTestThrow();
|
||||
|
||||
m_decorator->run( m_result );
|
||||
|
||||
m_testListener->verify();
|
||||
}
|
61
examples/cppunittest/ExceptionTestCaseDecoratorTest.h
Normal file
61
examples/cppunittest/ExceptionTestCaseDecoratorTest.h
Normal file
@ -0,0 +1,61 @@
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
// Header file ExceptionTestCaseDecoratorTest.h for class ExceptionTestCaseDecoratorTest
|
||||
// (c)Copyright 2000, Baptiste Lepilleur.
|
||||
// Created: 2002/08/03
|
||||
// //////////////////////////////////////////////////////////////////////////
|
||||
#ifndef EXCEPTIONTESTCASEDECORATORTEST_H
|
||||
#define EXCEPTIONTESTCASEDECORATORTEST_H
|
||||
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include <cppunit/TestResult.h>
|
||||
#include "FailureException.h"
|
||||
#include "MockTestCase.h"
|
||||
#include "MockTestListener.h"
|
||||
|
||||
|
||||
/// Unit tests for ExceptionTestCaseDecoratorTest
|
||||
class ExceptionTestCaseDecoratorTest : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( ExceptionTestCaseDecoratorTest );
|
||||
CPPUNIT_TEST( testNoExceptionThrownFailed );
|
||||
CPPUNIT_TEST( testExceptionThrownPass );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
/*! Constructs a ExceptionTestCaseDecoratorTest object.
|
||||
*/
|
||||
ExceptionTestCaseDecoratorTest();
|
||||
|
||||
/// Destructor.
|
||||
virtual ~ExceptionTestCaseDecoratorTest();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
void testNoExceptionThrownFailed();
|
||||
void testExceptionThrownPass();
|
||||
|
||||
private:
|
||||
/// Prevents the use of the copy constructor.
|
||||
ExceptionTestCaseDecoratorTest( const ExceptionTestCaseDecoratorTest &other );
|
||||
|
||||
/// Prevents the use of the copy operator.
|
||||
void operator =( const ExceptionTestCaseDecoratorTest &other );
|
||||
|
||||
private:
|
||||
typedef CPPUNIT_NS::ExceptionTestCaseDecorator<FailureException> FailureExceptionTestCase;
|
||||
|
||||
CPPUNIT_NS::TestResult *m_result;
|
||||
MockTestListener *m_testListener;
|
||||
MockTestCase *m_test;
|
||||
FailureExceptionTestCase *m_decorator;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Inlines methods for ExceptionTestCaseDecoratorTest:
|
||||
// ---------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#endif // EXCEPTIONTESTCASEDECORATORTEST_H
|
12
examples/cppunittest/ExtensionSuite.h
Normal file
12
examples/cppunittest/ExtensionSuite.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef CPPUNITTEST_EXTENSIONSSUITE_H
|
||||
#define CPPUNITTEST_EXTENSIONSSUITE_H
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
#include <string>
|
||||
|
||||
inline std::string extensionSuiteName()
|
||||
{
|
||||
return "Extensions";
|
||||
}
|
||||
|
||||
#endif // CPPUNITTEST_EXTENSIONSSUITE_H
|
10
examples/cppunittest/FailureException.h
Normal file
10
examples/cppunittest/FailureException.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef FAILUREEXCEPTION_H
|
||||
#define FAILUREEXCEPTION_H
|
||||
|
||||
|
||||
class FailureException
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
#endif // FAILUREEXCEPTION_H
|
227
examples/cppunittest/HelperMacrosTest.cpp
Normal file
227
examples/cppunittest/HelperMacrosTest.cpp
Normal file
@ -0,0 +1,227 @@
|
||||
#include <cppunit/config/SourcePrefix.h>
|
||||
#include "FailureException.h"
|
||||
#include "HelperMacrosTest.h"
|
||||
#include "HelperSuite.h"
|
||||
#include "MockTestCase.h"
|
||||
#include "SubclassedTestCase.h"
|
||||
#include <cppunit/TestResult.h>
|
||||
#include <memory>
|
||||
|
||||
/* Note:
|
||||
- no unit test for CPPUNIT_TEST_SUITE_REGISTRATION...
|
||||
*/
|
||||
|
||||
class FailTestFixture : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( FailTestFixture );
|
||||
CPPUNIT_TEST_FAIL( testFail );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
public:
|
||||
void testFail()
|
||||
{
|
||||
CPPUNIT_ASSERT_MESSAGE( "Failure", false );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class FailToFailTestFixture : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( FailToFailTestFixture );
|
||||
CPPUNIT_TEST_FAIL( testFailToFail );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
public:
|
||||
void testFailToFail()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class ExceptionTestFixture : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( ExceptionTestFixture );
|
||||
CPPUNIT_TEST_EXCEPTION( testException, FailureException );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
public:
|
||||
void testException()
|
||||
{
|
||||
throw FailureException();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class ExceptionNotCaughtTestFixture : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( ExceptionNotCaughtTestFixture );
|
||||
CPPUNIT_TEST_EXCEPTION( testExceptionNotCaught, FailureException );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
public:
|
||||
void testExceptionNotCaught()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class CustomsTestTestFixture : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( CustomsTestTestFixture );
|
||||
CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS( addCustomTests );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
public:
|
||||
static void addCustomTests( TestSuiteBuilderContextType &context )
|
||||
{
|
||||
MockTestCase *test1 = new MockTestCase( context.getTestNameFor( "myCustomTest1" ) );
|
||||
test1->makeRunTestThrow();
|
||||
MockTestCase *test2 = new MockTestCase( context.getTestNameFor( "myCustomTest2" ) );
|
||||
context.addTest( test1 );
|
||||
context.addTest( test2 );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#undef TEST_ADD_N_MOCK
|
||||
#define TEST_ADD_N_MOCK( totalCount ) \
|
||||
{ \
|
||||
for ( int count = (totalCount); count > 0; --count ) \
|
||||
CPPUNIT_TEST_SUITE_ADD_TEST( \
|
||||
new MockTestCase( context.getTestNameFor( "dummyName" ) ) ); \
|
||||
}
|
||||
|
||||
|
||||
|
||||
class AddTestTestFixture : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( AddTestTestFixture );
|
||||
TEST_ADD_N_MOCK( 7 );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
|
||||
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( HelperMacrosTest,
|
||||
helperSuiteName() );
|
||||
|
||||
|
||||
HelperMacrosTest::HelperMacrosTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
HelperMacrosTest::~HelperMacrosTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::setUp()
|
||||
{
|
||||
m_testListener = new MockTestListener( "mock-testlistener" );
|
||||
m_result = new CPPUNIT_NS::TestResult();
|
||||
m_result->addListener( m_testListener );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::tearDown()
|
||||
{
|
||||
delete m_result;
|
||||
delete m_testListener;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::testNoSubclassing()
|
||||
{
|
||||
std::auto_ptr<CPPUNIT_NS::TestSuite> suite( BaseTestCase::suite() );
|
||||
CPPUNIT_ASSERT_EQUAL( 1, suite->countTestCases() );
|
||||
m_testListener->setExpectedStartTestCall( 1 );
|
||||
m_testListener->setExpectNoFailure();
|
||||
|
||||
suite->run( m_result );
|
||||
m_testListener->verify();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::testSubclassing()
|
||||
{
|
||||
std::auto_ptr<CPPUNIT_NS::TestSuite> suite( SubclassedTestCase::suite() );
|
||||
CPPUNIT_ASSERT_EQUAL( 2, suite->countTestCases() );
|
||||
m_testListener->setExpectedStartTestCall( 2 );
|
||||
m_testListener->setExpectedAddFailureCall( 1 );
|
||||
|
||||
suite->run( m_result );
|
||||
m_testListener->verify();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::testFail()
|
||||
{
|
||||
std::auto_ptr<CPPUNIT_NS::TestSuite> suite( FailTestFixture::suite() );
|
||||
m_testListener->setExpectedStartTestCall( 1 );
|
||||
m_testListener->setExpectNoFailure();
|
||||
|
||||
suite->run( m_result );
|
||||
m_testListener->verify();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::testFailToFail()
|
||||
{
|
||||
std::auto_ptr<CPPUNIT_NS::TestSuite> suite( FailToFailTestFixture::suite() );
|
||||
m_testListener->setExpectedStartTestCall( 1 );
|
||||
m_testListener->setExpectedAddFailureCall( 1 );
|
||||
|
||||
suite->run( m_result );
|
||||
m_testListener->verify();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::testException()
|
||||
{
|
||||
std::auto_ptr<CPPUNIT_NS::TestSuite> suite( ExceptionTestFixture::suite() );
|
||||
m_testListener->setExpectedStartTestCall( 1 );
|
||||
m_testListener->setExpectNoFailure();
|
||||
|
||||
suite->run( m_result );
|
||||
m_testListener->verify();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::testExceptionNotCaught()
|
||||
{
|
||||
std::auto_ptr<CPPUNIT_NS::TestSuite> suite( ExceptionNotCaughtTestFixture::suite() );
|
||||
m_testListener->setExpectedStartTestCall( 1 );
|
||||
m_testListener->setExpectedAddFailureCall( 1 );
|
||||
|
||||
suite->run( m_result );
|
||||
m_testListener->verify();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::testCustomTests()
|
||||
{
|
||||
std::auto_ptr<CPPUNIT_NS::TestSuite> suite( CustomsTestTestFixture::suite() );
|
||||
m_testListener->setExpectedStartTestCall( 2 );
|
||||
m_testListener->setExpectedAddFailureCall( 1 );
|
||||
|
||||
suite->run( m_result );
|
||||
m_testListener->verify();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HelperMacrosTest::testAddTest()
|
||||
{
|
||||
std::auto_ptr<CPPUNIT_NS::TestSuite> suite( AddTestTestFixture::suite() );
|
||||
m_testListener->setExpectedStartTestCall( 7 );
|
||||
m_testListener->setExpectedAddFailureCall( 0 );
|
||||
|
||||
suite->run( m_result );
|
||||
m_testListener->verify();
|
||||
}
|
53
examples/cppunittest/HelperMacrosTest.h
Normal file
53
examples/cppunittest/HelperMacrosTest.h
Normal file
@ -0,0 +1,53 @@
|
||||
#ifndef HELPERMACROSTEST_H
|
||||
#define HELPERMACROSTEST_H
|
||||
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include "MockTestListener.h"
|
||||
|
||||
|
||||
class HelperMacrosTest : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( HelperMacrosTest );
|
||||
CPPUNIT_TEST( testNoSubclassing );
|
||||
CPPUNIT_TEST( testSubclassing );
|
||||
CPPUNIT_TEST( testFail );
|
||||
CPPUNIT_TEST( testFailToFail );
|
||||
CPPUNIT_TEST( testException );
|
||||
CPPUNIT_TEST( testExceptionNotCaught );
|
||||
CPPUNIT_TEST( testCustomTests );
|
||||
CPPUNIT_TEST( testAddTest );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
HelperMacrosTest();
|
||||
virtual ~HelperMacrosTest();
|
||||
|
||||
virtual void setUp();
|
||||
virtual void tearDown();
|
||||
|
||||
void testNoSubclassing();
|
||||
|
||||
void testSubclassing();
|
||||
|
||||
void testFail();
|
||||
void testFailToFail();
|
||||
|
||||
void testException();
|
||||
void testExceptionNotCaught();
|
||||
|
||||
void testCustomTest();
|
||||
void testCustomTests();
|
||||
void testAddTest();
|
||||
|
||||
private:
|
||||
HelperMacrosTest( const HelperMacrosTest © );
|
||||
void operator =( const HelperMacrosTest © );
|
||||
|
||||
private:
|
||||
CPPUNIT_NS::TestResult *m_result;
|
||||
MockTestListener *m_testListener;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // HELPERMACROSTEST_H
|
13
examples/cppunittest/HelperSuite.h
Normal file
13
examples/cppunittest/HelperSuite.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef CPPUNITTEST_HELPERSUITE_H
|
||||
#define CPPUNITTEST_HELPERSUITE_H
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
#include <string>
|
||||
|
||||
inline std::string helperSuiteName()
|
||||
{
|
||||
return "Helpers";
|
||||
}
|
||||
|
||||
|
||||
#endif // CPPUNITTEST_HELPERSUITE_H
|
83
examples/cppunittest/Makefile.am
Normal file
83
examples/cppunittest/Makefile.am
Normal file
@ -0,0 +1,83 @@
|
||||
EXTRA_DIST = CppUnitTestMain.dsw CppUnitTestMain.dsp CppUnitTestPlugIn.dsp CppUnitTestPlugIn.cpp
|
||||
|
||||
TESTS = cppunittestmain
|
||||
check_PROGRAMS = $(TESTS)
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
|
||||
cppunittestmain_SOURCES = \
|
||||
assertion_traitsTest.cpp \
|
||||
assertion_traitsTest.h \
|
||||
BaseTestCase.cpp \
|
||||
BaseTestCase.h \
|
||||
CoreSuite.h \
|
||||
CppUnitTestMain.cpp \
|
||||
CppUnitTestSuite.cpp \
|
||||
ExceptionTest.cpp \
|
||||
ExceptionTest.h \
|
||||
ExceptionTestCaseDecoratorTest.h \
|
||||
ExceptionTestCaseDecoratorTest.cpp \
|
||||
ExtensionSuite.h \
|
||||
FailureException.h \
|
||||
HelperMacrosTest.cpp \
|
||||
HelperMacrosTest.h \
|
||||
HelperSuite.h \
|
||||
MessageTest.h \
|
||||
MessageTest.cpp \
|
||||
MockFunctor.h \
|
||||
MockProtector.h \
|
||||
MockTestCase.h \
|
||||
MockTestCase.cpp \
|
||||
MockTestListener.cpp \
|
||||
MockTestListener.h \
|
||||
OrthodoxTest.cpp \
|
||||
OrthodoxTest.h \
|
||||
OutputSuite.h \
|
||||
RepeatedTestTest.cpp \
|
||||
RepeatedTestTest.h \
|
||||
StringToolsTest.h \
|
||||
StringToolsTest.cpp \
|
||||
SubclassedTestCase.cpp \
|
||||
SubclassedTestCase.h \
|
||||
SynchronizedTestResult.h \
|
||||
TestAssertTest.cpp \
|
||||
TestAssertTest.h \
|
||||
TestCallerTest.cpp \
|
||||
TestCallerTest.h \
|
||||
TestCaseTest.cpp \
|
||||
TestCaseTest.h \
|
||||
TestDecoratorTest.cpp \
|
||||
TestDecoratorTest.h \
|
||||
TestFailureTest.cpp \
|
||||
TestFailureTest.h \
|
||||
TestPathTest.h \
|
||||
TestPathTest.cpp \
|
||||
TestResultCollectorTest.cpp \
|
||||
TestResultCollectorTest.h \
|
||||
TestResultTest.cpp \
|
||||
TestResultTest.h \
|
||||
TestSetUpTest.cpp \
|
||||
TestSetUpTest.h \
|
||||
TestSuiteTest.cpp \
|
||||
TestSuiteTest.h \
|
||||
TestTest.cpp \
|
||||
TestTest.h \
|
||||
ToolsSuite.h \
|
||||
TrackedTestCase.cpp \
|
||||
TrackedTestCase.h \
|
||||
UnitTestToolSuite.h \
|
||||
XmlElementTest.h \
|
||||
XmlElementTest.cpp \
|
||||
XmlOutputterTest.h \
|
||||
XmlOutputterTest.cpp \
|
||||
XmlUniformiser.h \
|
||||
XmlUniformiser.cpp \
|
||||
XmlUniformiserTest.h \
|
||||
XmlUniformiserTest.cpp
|
||||
|
||||
cppunittestmain_LDADD= \
|
||||
$(top_builddir)/src/cppunit/libcppunit.la
|
||||
|
||||
cppunittestmain_LDFLAGS = $(LIBADD_DL)
|
||||
|
||||
|
669
examples/cppunittest/Makefile.in
Normal file
669
examples/cppunittest/Makefile.in
Normal file
@ -0,0 +1,669 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
TESTS = cppunittestmain$(EXEEXT)
|
||||
check_PROGRAMS = $(am__EXEEXT_1)
|
||||
subdir = examples/cppunittest
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/ac_create_prefix_config_h.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_sstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_strstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_namespaces.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_rtti.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_string_compare_string_first.m4 \
|
||||
$(top_srcdir)/config/ac_dll.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_gcc_abi_demangle.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_have_isfinite.m4 \
|
||||
$(top_srcdir)/config/bb_enable_doxygen.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__EXEEXT_1 = cppunittestmain$(EXEEXT)
|
||||
am_cppunittestmain_OBJECTS = assertion_traitsTest.$(OBJEXT) \
|
||||
BaseTestCase.$(OBJEXT) CppUnitTestMain.$(OBJEXT) \
|
||||
CppUnitTestSuite.$(OBJEXT) ExceptionTest.$(OBJEXT) \
|
||||
ExceptionTestCaseDecoratorTest.$(OBJEXT) \
|
||||
HelperMacrosTest.$(OBJEXT) MessageTest.$(OBJEXT) \
|
||||
MockTestCase.$(OBJEXT) MockTestListener.$(OBJEXT) \
|
||||
OrthodoxTest.$(OBJEXT) RepeatedTestTest.$(OBJEXT) \
|
||||
StringToolsTest.$(OBJEXT) SubclassedTestCase.$(OBJEXT) \
|
||||
TestAssertTest.$(OBJEXT) TestCallerTest.$(OBJEXT) \
|
||||
TestCaseTest.$(OBJEXT) TestDecoratorTest.$(OBJEXT) \
|
||||
TestFailureTest.$(OBJEXT) TestPathTest.$(OBJEXT) \
|
||||
TestResultCollectorTest.$(OBJEXT) TestResultTest.$(OBJEXT) \
|
||||
TestSetUpTest.$(OBJEXT) TestSuiteTest.$(OBJEXT) \
|
||||
TestTest.$(OBJEXT) TrackedTestCase.$(OBJEXT) \
|
||||
XmlElementTest.$(OBJEXT) XmlOutputterTest.$(OBJEXT) \
|
||||
XmlUniformiser.$(OBJEXT) XmlUniformiserTest.$(OBJEXT)
|
||||
cppunittestmain_OBJECTS = $(am_cppunittestmain_OBJECTS)
|
||||
cppunittestmain_DEPENDENCIES = \
|
||||
$(top_builddir)/src/cppunit/libcppunit.la
|
||||
cppunittestmain_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(cppunittestmain_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(cppunittestmain_SOURCES)
|
||||
DIST_SOURCES = $(cppunittestmain_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPPUNIT_BINARY_AGE = @CPPUNIT_BINARY_AGE@
|
||||
CPPUNIT_INTERFACE_AGE = @CPPUNIT_INTERFACE_AGE@
|
||||
CPPUNIT_MAJOR_VERSION = @CPPUNIT_MAJOR_VERSION@
|
||||
CPPUNIT_MICRO_VERSION = @CPPUNIT_MICRO_VERSION@
|
||||
CPPUNIT_MINOR_VERSION = @CPPUNIT_MINOR_VERSION@
|
||||
CPPUNIT_VERSION = @CPPUNIT_VERSION@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOT = @DOT@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
enable_dot = @enable_dot@
|
||||
enable_html_docs = @enable_html_docs@
|
||||
enable_latex_docs = @enable_latex_docs@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = CppUnitTestMain.dsw CppUnitTestMain.dsp CppUnitTestPlugIn.dsp CppUnitTestPlugIn.cpp
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
cppunittestmain_SOURCES = \
|
||||
assertion_traitsTest.cpp \
|
||||
assertion_traitsTest.h \
|
||||
BaseTestCase.cpp \
|
||||
BaseTestCase.h \
|
||||
CoreSuite.h \
|
||||
CppUnitTestMain.cpp \
|
||||
CppUnitTestSuite.cpp \
|
||||
ExceptionTest.cpp \
|
||||
ExceptionTest.h \
|
||||
ExceptionTestCaseDecoratorTest.h \
|
||||
ExceptionTestCaseDecoratorTest.cpp \
|
||||
ExtensionSuite.h \
|
||||
FailureException.h \
|
||||
HelperMacrosTest.cpp \
|
||||
HelperMacrosTest.h \
|
||||
HelperSuite.h \
|
||||
MessageTest.h \
|
||||
MessageTest.cpp \
|
||||
MockFunctor.h \
|
||||
MockProtector.h \
|
||||
MockTestCase.h \
|
||||
MockTestCase.cpp \
|
||||
MockTestListener.cpp \
|
||||
MockTestListener.h \
|
||||
OrthodoxTest.cpp \
|
||||
OrthodoxTest.h \
|
||||
OutputSuite.h \
|
||||
RepeatedTestTest.cpp \
|
||||
RepeatedTestTest.h \
|
||||
StringToolsTest.h \
|
||||
StringToolsTest.cpp \
|
||||
SubclassedTestCase.cpp \
|
||||
SubclassedTestCase.h \
|
||||
SynchronizedTestResult.h \
|
||||
TestAssertTest.cpp \
|
||||
TestAssertTest.h \
|
||||
TestCallerTest.cpp \
|
||||
TestCallerTest.h \
|
||||
TestCaseTest.cpp \
|
||||
TestCaseTest.h \
|
||||
TestDecoratorTest.cpp \
|
||||
TestDecoratorTest.h \
|
||||
TestFailureTest.cpp \
|
||||
TestFailureTest.h \
|
||||
TestPathTest.h \
|
||||
TestPathTest.cpp \
|
||||
TestResultCollectorTest.cpp \
|
||||
TestResultCollectorTest.h \
|
||||
TestResultTest.cpp \
|
||||
TestResultTest.h \
|
||||
TestSetUpTest.cpp \
|
||||
TestSetUpTest.h \
|
||||
TestSuiteTest.cpp \
|
||||
TestSuiteTest.h \
|
||||
TestTest.cpp \
|
||||
TestTest.h \
|
||||
ToolsSuite.h \
|
||||
TrackedTestCase.cpp \
|
||||
TrackedTestCase.h \
|
||||
UnitTestToolSuite.h \
|
||||
XmlElementTest.h \
|
||||
XmlElementTest.cpp \
|
||||
XmlOutputterTest.h \
|
||||
XmlOutputterTest.cpp \
|
||||
XmlUniformiser.h \
|
||||
XmlUniformiser.cpp \
|
||||
XmlUniformiserTest.h \
|
||||
XmlUniformiserTest.cpp
|
||||
|
||||
cppunittestmain_LDADD = \
|
||||
$(top_builddir)/src/cppunit/libcppunit.la
|
||||
|
||||
cppunittestmain_LDFLAGS = $(LIBADD_DL)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/cppunittest/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu examples/cppunittest/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
@list='$(check_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
cppunittestmain$(EXEEXT): $(cppunittestmain_OBJECTS) $(cppunittestmain_DEPENDENCIES)
|
||||
@rm -f cppunittestmain$(EXEEXT)
|
||||
$(cppunittestmain_LINK) $(cppunittestmain_OBJECTS) $(cppunittestmain_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BaseTestCase.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CppUnitTestMain.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CppUnitTestSuite.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExceptionTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExceptionTestCaseDecoratorTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HelperMacrosTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MockTestCase.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MockTestListener.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OrthodoxTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RepeatedTestTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StringToolsTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SubclassedTestCase.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestAssertTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestCallerTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestCaseTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestDecoratorTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestFailureTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestPathTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestResultCollectorTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestResultTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestSetUpTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestSuiteTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TrackedTestCase.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XmlElementTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XmlOutputterTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XmlUniformiser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XmlUniformiserTest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assertion_traitsTest.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
list=' $(TESTS) '; \
|
||||
if test -n "$$list"; then \
|
||||
for tst in $$list; do \
|
||||
if test -f ./$$tst; then dir=./; \
|
||||
elif test -f $$tst; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*$$ws$$tst$$ws*) \
|
||||
xpass=`expr $$xpass + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "XPASS: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
echo "PASS: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*$$ws$$tst$$ws*) \
|
||||
xfail=`expr $$xfail + 1`; \
|
||||
echo "XFAIL: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "FAIL: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
else \
|
||||
skip=`expr $$skip + 1`; \
|
||||
echo "SKIP: $$tst"; \
|
||||
fi; \
|
||||
done; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
if test "$$xfail" -eq 0; then \
|
||||
banner="All $$all tests passed"; \
|
||||
else \
|
||||
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
|
||||
fi; \
|
||||
else \
|
||||
if test "$$xpass" -eq 0; then \
|
||||
banner="$$failed of $$all tests failed"; \
|
||||
else \
|
||||
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dashes="$$banner"; \
|
||||
skipped=""; \
|
||||
if test "$$skip" -ne 0; then \
|
||||
skipped="($$skip tests were not run)"; \
|
||||
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$skipped"; \
|
||||
fi; \
|
||||
report=""; \
|
||||
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
report="Please report to $(PACKAGE_BUGREPORT)"; \
|
||||
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$report"; \
|
||||
fi; \
|
||||
dashes=`echo "$$dashes" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
test -z "$$skipped" || echo "$$skipped"; \
|
||||
test -z "$$report" || echo "$$report"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0; \
|
||||
else :; fi
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
|
||||
clean-checkPROGRAMS clean-generic clean-libtool ctags \
|
||||
distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
234
examples/cppunittest/MessageTest.cpp
Normal file
234
examples/cppunittest/MessageTest.cpp
Normal file
@ -0,0 +1,234 @@
|
||||
#include "CoreSuite.h"
|
||||
#include "MessageTest.h"
|
||||
|
||||
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( MessageTest,
|
||||
coreSuiteName() );
|
||||
|
||||
|
||||
MessageTest::MessageTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
MessageTest::~MessageTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::setUp()
|
||||
{
|
||||
m_message = new CPPUNIT_NS::Message();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::tearDown()
|
||||
{
|
||||
delete m_message;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testDefaultConstructor()
|
||||
{
|
||||
std::string empty;
|
||||
CPPUNIT_ASSERT_EQUAL( empty, m_message->shortDescription() );
|
||||
CPPUNIT_ASSERT_EQUAL( 0, m_message->detailCount() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testDetailAtThrowIfBadIndex()
|
||||
{
|
||||
m_message->detailAt( -1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testDetailAtThrowIfBadIndex2()
|
||||
{
|
||||
m_message->detailAt( 0 );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testAddDetail()
|
||||
{
|
||||
std::string expected( "first" );
|
||||
m_message->addDetail( expected );
|
||||
CPPUNIT_ASSERT_EQUAL( 1, m_message->detailCount() );
|
||||
CPPUNIT_ASSERT_EQUAL( expected, m_message->detailAt(0) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testAddDetail2()
|
||||
{
|
||||
std::string expected1( "first" );
|
||||
std::string expected2( "second" );
|
||||
m_message->addDetail( expected1, expected2 );
|
||||
CPPUNIT_ASSERT_EQUAL( 2, m_message->detailCount() );
|
||||
CPPUNIT_ASSERT_EQUAL( expected1, m_message->detailAt(0) );
|
||||
CPPUNIT_ASSERT_EQUAL( expected2, m_message->detailAt(1) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testAddDetail3()
|
||||
{
|
||||
std::string expected1( "first" );
|
||||
std::string expected2( "second" );
|
||||
std::string expected3( "third" );
|
||||
m_message->addDetail( expected1, expected2, expected3 );
|
||||
CPPUNIT_ASSERT_EQUAL( 3, m_message->detailCount() );
|
||||
CPPUNIT_ASSERT_EQUAL( expected1, m_message->detailAt(0) );
|
||||
CPPUNIT_ASSERT_EQUAL( expected2, m_message->detailAt(1) );
|
||||
CPPUNIT_ASSERT_EQUAL( expected3, m_message->detailAt(2) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testAddDetailEmptyMessage()
|
||||
{
|
||||
m_message->addDetail( CPPUNIT_NS::Message() );
|
||||
CPPUNIT_ASSERT_EQUAL( 0, m_message->detailCount() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testAddDetailMessage()
|
||||
{
|
||||
std::string expected1( "first" );
|
||||
std::string expected2( "second" );
|
||||
m_message->addDetail( CPPUNIT_NS::Message( "shortDesc", expected1, expected2 ) );
|
||||
CPPUNIT_ASSERT_EQUAL( 2, m_message->detailCount() );
|
||||
CPPUNIT_ASSERT_EQUAL( expected1, m_message->detailAt(0) );
|
||||
CPPUNIT_ASSERT_EQUAL( expected2, m_message->detailAt(1) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testSetShortDescription()
|
||||
{
|
||||
std::string expected( "shortDesc" );
|
||||
m_message->setShortDescription( expected );
|
||||
CPPUNIT_ASSERT_EQUAL( expected, m_message->shortDescription() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testClearDetails()
|
||||
{
|
||||
m_message->addDetail( "detail1" );
|
||||
m_message->clearDetails();
|
||||
CPPUNIT_ASSERT_EQUAL( 0, m_message->detailCount() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testConstructor()
|
||||
{
|
||||
std::string expected( "short" );
|
||||
CPPUNIT_NS::Message message( expected );
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( expected, message.shortDescription() );
|
||||
CPPUNIT_ASSERT_EQUAL( 0, message.detailCount() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testConstructorDetail1()
|
||||
{
|
||||
std::string expected( "short" );
|
||||
std::string expected1( "detail-1" );
|
||||
CPPUNIT_NS::Message message( expected, expected1 );
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( expected, message.shortDescription() );
|
||||
CPPUNIT_ASSERT_EQUAL( 1, message.detailCount() );
|
||||
CPPUNIT_ASSERT_EQUAL( expected1, message.detailAt(0) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testConstructorDetail2()
|
||||
{
|
||||
std::string expected( "short" );
|
||||
std::string expected1( "detail-1" );
|
||||
std::string expected2( "detail-2" );
|
||||
CPPUNIT_NS::Message message( expected, expected1, expected2 );
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( expected, message.shortDescription() );
|
||||
CPPUNIT_ASSERT_EQUAL( 2, message.detailCount() );
|
||||
CPPUNIT_ASSERT_EQUAL( expected1, message.detailAt(0) );
|
||||
CPPUNIT_ASSERT_EQUAL( expected2, message.detailAt(1) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testConstructorDetail3()
|
||||
{
|
||||
std::string expected( "short" );
|
||||
std::string expected1( "detail-1" );
|
||||
std::string expected2( "detail-2" );
|
||||
std::string expected3( "detail-3" );
|
||||
CPPUNIT_NS::Message message( expected, expected1, expected2, expected3 );
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( expected, message.shortDescription() );
|
||||
CPPUNIT_ASSERT_EQUAL( 3, message.detailCount() );
|
||||
CPPUNIT_ASSERT_EQUAL( expected1, message.detailAt(0) );
|
||||
CPPUNIT_ASSERT_EQUAL( expected2, message.detailAt(1) );
|
||||
CPPUNIT_ASSERT_EQUAL( expected3, message.detailAt(2) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testDetailsNone()
|
||||
{
|
||||
CPPUNIT_ASSERT_MESSAGE("012345678901234",true);
|
||||
std::string empty;
|
||||
CPPUNIT_ASSERT_EQUAL( empty, m_message->details() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testDetailsSome()
|
||||
{
|
||||
m_message->addDetail( "Expected: 1", "Actual: 7", "Info: number" );
|
||||
std::string expected( "- Expected: 1\n- Actual: 7\n- Info: number\n" );
|
||||
std::string actual = m_message->details();
|
||||
CPPUNIT_ASSERT_EQUAL( expected, actual );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testEqual()
|
||||
{
|
||||
CPPUNIT_ASSERT( *m_message == CPPUNIT_NS::Message() );
|
||||
|
||||
CPPUNIT_NS::Message message1( "short", "det1", "det2", "det3" );
|
||||
CPPUNIT_NS::Message message2( message1 );
|
||||
CPPUNIT_ASSERT( message1 == message2 );
|
||||
|
||||
CPPUNIT_ASSERT( !(*m_message == message1) );
|
||||
|
||||
CPPUNIT_NS::Message message3( "short" );
|
||||
CPPUNIT_ASSERT( !(message3 == message1) );
|
||||
|
||||
CPPUNIT_NS::Message message4( "long" );
|
||||
CPPUNIT_ASSERT( !(message3 == message4) );
|
||||
|
||||
CPPUNIT_NS::Message message5( "short", "det1", "det-2", "det3" );
|
||||
CPPUNIT_ASSERT( !(message1 == message5) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MessageTest::testNotEqual()
|
||||
{
|
||||
CPPUNIT_NS::Message message1( "short", "det1", "det2", "det3" );
|
||||
CPPUNIT_NS::Message message2( "short", "det1", "det-2", "det3" );
|
||||
CPPUNIT_ASSERT( message1 != message2 );
|
||||
CPPUNIT_ASSERT( !(message1 != message1) );
|
||||
}
|
76
examples/cppunittest/MessageTest.h
Normal file
76
examples/cppunittest/MessageTest.h
Normal file
@ -0,0 +1,76 @@
|
||||
#ifndef MESSAGETEST_H
|
||||
#define MESSAGETEST_H
|
||||
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include <cppunit/Message.h>
|
||||
#include <stdexcept>
|
||||
|
||||
|
||||
/// Unit tests for MessageTest
|
||||
class MessageTest : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( MessageTest );
|
||||
CPPUNIT_TEST( testDefaultConstructor );
|
||||
CPPUNIT_TEST_EXCEPTION( testDetailAtThrowIfBadIndex, std::invalid_argument );
|
||||
CPPUNIT_TEST_EXCEPTION( testDetailAtThrowIfBadIndex2, std::invalid_argument );
|
||||
CPPUNIT_TEST( testAddDetail );
|
||||
CPPUNIT_TEST( testAddDetail2 );
|
||||
CPPUNIT_TEST( testAddDetail3 );
|
||||
CPPUNIT_TEST( testAddDetailEmptyMessage );
|
||||
CPPUNIT_TEST( testAddDetailMessage );
|
||||
CPPUNIT_TEST( testSetShortDescription );
|
||||
CPPUNIT_TEST( testClearDetails );
|
||||
CPPUNIT_TEST( testConstructor );
|
||||
CPPUNIT_TEST( testConstructorDetail1 );
|
||||
CPPUNIT_TEST( testConstructorDetail2 );
|
||||
CPPUNIT_TEST( testConstructorDetail3 );
|
||||
CPPUNIT_TEST( testDetailsNone );
|
||||
CPPUNIT_TEST( testDetailsSome );
|
||||
CPPUNIT_TEST( testEqual );
|
||||
CPPUNIT_TEST( testNotEqual );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
MessageTest();
|
||||
|
||||
virtual ~MessageTest();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
void testDefaultConstructor();
|
||||
void testDetailAtThrowIfBadIndex();
|
||||
void testDetailAtThrowIfBadIndex2();
|
||||
void testAddDetail();
|
||||
void testAddDetail2();
|
||||
void testAddDetail3();
|
||||
void testAddDetailEmptyMessage();
|
||||
void testAddDetailMessage();
|
||||
void testSetShortDescription();
|
||||
void testClearDetails();
|
||||
|
||||
void testConstructor();
|
||||
void testConstructorDetail1();
|
||||
void testConstructorDetail2();
|
||||
void testConstructorDetail3();
|
||||
|
||||
void testDetailsNone();
|
||||
void testDetailsSome();
|
||||
|
||||
void testEqual();
|
||||
void testNotEqual();
|
||||
|
||||
private:
|
||||
/// Prevents the use of the copy constructor.
|
||||
MessageTest( const MessageTest &other );
|
||||
|
||||
/// Prevents the use of the copy operator.
|
||||
void operator =( const MessageTest &other );
|
||||
|
||||
private:
|
||||
CPPUNIT_NS::Message *m_message;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // MESSAGETEST_H
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user