File: NEWS

package info (click to toggle)
cppunit 1.8.0-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,664 kB
  • ctags: 1,779
  • sloc: cpp: 10,756; sh: 7,005; makefile: 362; ansic: 266
file content (209 lines) | stat: -rw-r--r-- 8,163 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
	New in CppUnit 1.8.0:
	----------------------

	In short:
	- new assertions
	- new facilities to write custom assertions
	- new macros to define test case in your fixture
	- registration of test fixture in named suite
	- xml & compiler format test result output
	- a new graphic test runner for the QT library
	- MFC test runner window is resizable
	- cppunit as a DLL
	- Unicode support for MFC test runner.
	- architecture clean-up: TestResultCollector extracted from TestResult.
	- architecture clean-up: TestFixture extracted from TestCase.
	- cookbook and documentation updated.

* New assertion (TestAssert.h):

  CPPUNIT_FAIL(message) : equivalent to CPPUNIT_ASSERT_MESSAGE( message, false )

  CPPUNIT_ASSERT_EQUAL_MESSAGE( expectedValue, actualValue, additionalMessage ):
  behave like CPPUNIT_ASSERT_EQUAL but allow to add some contextual information.

* New macros to write test case (HelperMacros.h):

  CPPUNIT_TEST_EXCEPTION that expect an exception of a specified type to
  be thrown.

  CPPUNIT_TEST_FAIL that expect a test to fail.

  CPPUNIT_TEST_SUITE_NAMED_REGISTRATION to register a suite in a named suite. See
  cppunittest example for a demo.

* TextTestRunner (TextTestRunner.h):
  -run() returns a boolean indicating is the run was sucessful.
  -the constructor and setOutputter() allow you do define a specific outputter
  to print the test result (CompilerOutputter, TextOutputter, XmlOutputter...)
  -result() provide access to the result of the test run.
  -eventManager() give access to the TestResult, allowing you to register others
  TestListener.

* TestResult (TestResult.h):
  - That class has been splitted in two: TestResult and TestResultCollector.

  - TestResult manages the TestListener (registration and event dispatch), as
  well as the stop flag indicating if the current test run should be interrupted.
  All other responsabilites have been moved to TestResultCollector.

  - TestResult no longer hold the result of the test run (this is done by
  TestResultCollector which is a TestListener).

* TestListener (TestListener.h):
  - all failures and errors are reported using a single method:
    virtual void addFailure( const TestFailure &failure )
	=> the failure object life time is limited to that of the method call.
	Use TestFailure::isError() to distinguish error from failure.
	Use TestFailure::clone() to obtain a duplicate of the failure.

* New helpers to construct your own assertion (Asserter.h):

  It is now very easy to create your own assertion macro with failure
  location.

  Asserter namespace contains functions used to construct and throw exception
  to report failure. See Asserter documentation for an example of usage, and
  examples/cppunittest/XmlUniformiser.h for a real life example.

  CPPUNIT_SOURCELINE() macro have been added (SourceLine.h). It captures the 
  failure location in a SourceLine object. Use it to write your own macros.

  Asserter namespace contains functions used to construct and throw exception
  to report failure. See Asserter documentation for an example of usage, and
  examples/cppunittest/XmlUniformiser.h for a real life example.

* TestListener (TestListener.h):

  - TestSucesssListener : a simple listener that checks if a test has failed.

  - TestResultCollector : store all the test result. This class has been 
  extracted from the hold TestResult class.

  - TextTestProgressListener : print dot on cout to each time a test ends.
  Letter 'F' and 'E' are printed when a failure or an error occurs.

* Output (Outputter.h):

  - XML output: You can dump the TestResult as an XML document using 
  XmlOutputter. See examples/cppunittest/XmlOutputterTest.cpp for document
  structure and usage.

  - Compiler compatible output : CompilerOutputter print the result in a 
  compiler compatible format. You can use your IDE to jump to the first 
  failure. See examples/cppunittest/CppUniTestMain.cpp for an example of usage.

  - Text output : replace the deprecated TextTestResult. Print the result in
  a human readable format.

* NotEqualException constructor take an additional message (usually used to
point out where the difference occured between the expected and actual value)
that can be retreived with additionalMessage(). See Asserter documentation for
an example of usage.

* CppUnit

  - CppUnit can be compiled as a DLL (WIN32 platform). 
  DLL can be generated by the cppunit_dll.dsp project. You must define the 
  pre-processor symbol CPPUNIT_DLL when linking against CppUnit DLL.
  See cppunittests examples for an example.

* TestRunner

  - Qt TestRunner : a test runner for the Qt library (http://www.trolltech.com).
    See examples/qt for an example of use.

  - MFC TestRunner : the dialog can now be resized. List view column sizes, 
  as well as the dialog size, are saved. Unicode configurations have been added.

* Deprecated

  - TextTestResult : use the test listener TextTestProgressListener and the
  ouputter TextOuputter instead.

  - Methods having fileName, lineNumber as parameter. Usually replaced by
  a similar method that take a SourceLine parameter. Exception and
  TestAssert are impacted.

  - TestRegistryFactory::registerFactory( const std::string &name,
                                          TestFactory *factory ).
  
    You must define the symbol CPPUNIT_ENABLE_SOURCELINE_DEPRECATED to enable
  old Exception constructor, UNKNOWNFILENAME and UNKNOWNLINENUMBER, as well
  as function defined in the TestAssert namespace. The exception construction
  and throwing as been moved to Asserter namespace.

* Compatibility break:

	TestResult has been splitted in two class. TestResultCollector compatibility
	breaks refer to the methods that were previously in TestResult.

  - TestListener::addError() was removed. addFailure() is used to report
any kind of failure.
  - TestResultCollector::errors() was removed. Use failures() instead.
  - TestResultCollector::failures() now reports all kind of failures.
  - TestResultCollector::failures() returns a const reference.
  - void TestListener::addFailure( TestFailure *failure ) was removed.
  - void TestListener::addError( TestFailure *failure ) signature changed.

  - CPPUNIT_ASSERT_EQUAL_MESSAGE: changed arguments order. 'message' is now 
    the first argument instead of the last (like CPPUNIT_ASSERT_MESSAGE).
	Notes that CPPUNIT_ASSERT_EQUAL was introduced in release 1.7.3.

  - directory for TestRunners as moved from cppunitui/ to cppunit/ui/ (concern
  only users of release 1.7.10)

* Bug fix:
  - test ExceptionTest.testAssignment() don't fail anymore on VC++. See FAQ
    for detail.


	New in CppUnit 1.6.1
	--------------------

* This is a bug-fixing release.


	New in CppUnit 1.6.0
	--------------------

* All CppUnit macros now begin with "CPPUNIT_".  

  Macros CU_TEST_SUITE, CU_TEST, CU_TEST_SUITE_END, CU_TEST_SUB_SUITE,
  and CU_TEST_SUITE_REGISTRATION are renamed but are otherwise unchanged;
  they take the same arguments, and have the same effect.  The old-style
  macros can be used if your sources #define CPPUNIT_ENABLE_CU_TEST_MACROS
  to 1 before including any CppUnit headers.

  Macros assert, assertEqual, and assertDoublesEqual, have been replaced
  by CPPUNIT_ASSERT, CPPUNIT_ASSERT_EQUAL, and CPPUNIT_ASSERT_DOUBLES_EQUAL,
  respectively.  Macro assertLongsEqual is replaced by CPPUNIT_ASSERT_EQUAL.
  The old assert macros can be used if your sources #define
  CPPUNIT_ENABLE_NAKED_ASSERT to 1 before including any CppUnit headers.

  The old macro names are deprecated and will vanish in a future version
  of CppUnit.


* Equality assertion CPPUNIT_ASSERT_EQUAL(expected,actual) can test
  any type of expression.  The types of "expected" and "actual" must
  be the same; use a cast if necessary.


* Equality tested using CPPUNIT_ASSERT_EQUAL may be re-defined using
  a traits class.  Ditto for the string representation used in the
  diagnostic messages.


* New assertion with arbitrary message: CPPUNIT_ASSERT_MESSAGE.


* A test case obtained using class TestCaller may check that
  a particular exception is thrown.


* CppUnit has a test suite for itself!


* VC++ integration for MFC TestRunner.