| 1 |
New in CppUnit 1.14.0: |
| 2 |
--------------------- |
| 3 |
|
| 4 |
- TestCaller supports any callable that can be put into |
| 5 |
std::function<void()>. |
| 6 |
|
| 7 |
- CPPUNIT_TEST_PARAMETERIZED executes a test for any value in |
| 8 |
an iteratable. |
| 9 |
|
| 10 |
- Added new Assertion macros: ASSERT_LESS, ASSERT_GREATER, |
| 11 |
ASSERT_LESSEQUAL, ASSERT_GREATEREQUAL |
| 12 |
|
| 13 |
* Portability: |
| 14 |
- Always build with C++11. |
| 15 |
|
| 16 |
- Always require RTTI support. |
| 17 |
|
| 18 |
- Removed support for compilers that don't support |
| 19 |
default template arguments with standard containers. |
| 20 |
|
| 21 |
- Removed portability headers for wrapper around |
| 22 |
standard containers. |
| 23 |
|
| 24 |
- Support C++11 enum class in asserter. |
| 25 |
|
| 26 |
* Test Plug-in Runner: |
| 27 |
- Fixed crash on Win64 in test runner (fdo#81433) |
| 28 |
|
| 29 |
* Removed features |
| 30 |
|
| 31 |
- QT test runner |
| 32 |
|
| 33 |
- msvc6 test runners |
| 34 |
|
| 35 |
- msvc6 plugin |
| 36 |
|
| 37 |
- BeOS support |
| 38 |
|
| 39 |
New in CppUnit 1.13.2: |
| 40 |
--------------------- |
| 41 |
|
| 42 |
* Portability: |
| 43 |
- Supports 64 bit build on windows |
| 44 |
|
| 45 |
- Report errors from dlopen and dlclose through dlerror on |
| 46 |
unix/linux. |
| 47 |
|
| 48 |
New in CppUnit 1.13.1: |
| 49 |
--------------------- |
| 50 |
|
| 51 |
* Portability: |
| 52 |
- Use portable way to use free (fdo#52536) |
| 53 |
|
| 54 |
- Prevent crash when demangling fails with gcc (fdo#52539) |
| 55 |
|
| 56 |
New in CppUnit 1.13.0: |
| 57 |
---------------------- |
| 58 |
|
| 59 |
* Portability: |
| 60 |
- Added support for macro CPPUNIT_UNIQUE_COUNTER to config-*.h. It |
| 61 |
should expands to a unique number per translation unit. Default |
| 62 |
to __LINE__ if not defined. Use __COUNTER__ on MSVS 7.0+. |
| 63 |
(Bug #2031696) |
| 64 |
|
| 65 |
* Compilation |
| 66 |
|
| 67 |
- destructor of Message causes segfault when testing (rhbz#641350) |
| 68 |
|
| 69 |
- use correct CPPUNIT_VERSION value (sf#2983798) |
| 70 |
|
| 71 |
- allow -Werror builds |
| 72 |
(various Libreoffice patches) |
| 73 |
|
| 74 |
- finite in "ieeefp.h" instead of math.h on Solaris (sf#2912590) |
| 75 |
|
| 76 |
- Fixed compilation issue with Microsoft Visual Studio.Net 2005/2008 and |
| 77 |
added Visual Studio 2005/2010 projects (.vcproj/.vcxproj) |
| 78 |
|
| 79 |
- Changes to build without warnings using gcc -Wall -W -ansi |
| 80 |
(patch #1898225 contributed by dpkatz) |
| 81 |
|
| 82 |
- Libraries flags such as "-ldl" are now in LDADD instead of LIBADD_DL |
| 83 |
( patch #2807259 contributed by Jan Echternach). |
| 84 |
|
| 85 |
- Fixed detection of cxxabi.h with gcc 4.3 in configure (bug #2796543). |
| 86 |
|
| 87 |
- made TestCaseDecorator copy c'tor and operator= private (fdo#51317) |
| 88 |
|
| 89 |
* Documentation |
| 90 |
|
| 91 |
- Updated several false documentation entries (sf#2185407, sf#2186611) |
| 92 |
|
| 93 |
* Test Plug-in Runner: |
| 94 |
- fixed memory leak in TestPlugInRunnerDlg (#1721408) |
| 95 |
|
| 96 |
|
| 97 |
New in CppUnit 1.12.1: |
| 98 |
---------------------- |
| 99 |
|
| 100 |
* Assertion: |
| 101 |
|
| 102 |
- CPPUNIT_ASSERT_DOUBLES_EQUAL() now properly handles non-finite |
| 103 |
values, specifically NaN, +Inf, and -Inf. |
| 104 |
|
| 105 |
* Portability: |
| 106 |
|
| 107 |
- Fixed some compilation issue for QtTestRunner. |
| 108 |
- Code should build on Windows in UNICODE mode. |
| 109 |
|
| 110 |
New in CppUnit 1.12.0: |
| 111 |
---------------------- |
| 112 |
|
| 113 |
* Portability: |
| 114 |
|
| 115 |
- autogen.sh can now be run on Mac OS X (patch #1449380 |
| 116 |
contributed by Sander Temme). |
| 117 |
|
| 118 |
* MFC Test runner: |
| 119 |
|
| 120 |
- fixed bug #1498175: double click on failure would sometime |
| 121 |
not goto failed assertion in visual studio. |
| 122 |
|
| 123 |
* Documentation: |
| 124 |
|
| 125 |
- now generated with doxygen 1.4.7 new 'tabs' style. |
| 126 |
|
| 127 |
|
| 128 |
New in CppUnit 1.11.4: |
| 129 |
---------------------- |
| 130 |
|
| 131 |
|
| 132 |
* Portability: |
| 133 |
|
| 134 |
- Support for Embedded Visual C++ 4 added. For this purpose, CppUnit now |
| 135 |
provides a very simple stream implementation if none is provided. |
| 136 |
This should also help porting on other platforms which have STL but |
| 137 |
no stream support. Just make sure that CPPUNIT_NO_STREAM is defined |
| 138 |
to 1 in your config header. |
| 139 |
|
| 140 |
* Assertion: |
| 141 |
|
| 142 |
- Added missing _MESSAGE variants for the following assertions: |
| 143 |
|
| 144 |
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE |
| 145 |
CPPUNIT_ASSERT_THROW_MESSAGE |
| 146 |
CPPUNIT_ASSERT_NO_THROW_MESSAGE |
| 147 |
CPPUNIT_ASSERT_ASSERTION_FAIL_MESSAGE |
| 148 |
CPPUNIT_ASSERT_ASSERTION_PASS_MESSAGE |
| 149 |
|
| 150 |
Notes: change made to CPPUNIT_ASSERT_THROW may cause compilation error |
| 151 |
if you're expecting std::exception as it would be caught twice. Contact us |
| 152 |
if it is an issue (we don't see much use for such a test). |
| 153 |
|
| 154 |
Some assertions failure message are now more detailed (exception, |
| 155 |
expression). |
| 156 |
Thanks to Neil Ferguson who contributed this patch. |
| 157 |
|
| 158 |
- Assertion on real number now output expected and actual value using the |
| 159 |
maximum available precision instead of the previous strategy of rounding |
| 160 |
to 6 digits. |
| 161 |
|
| 162 |
Thanks to Neil Ferguson who contributed this patch. |
| 163 |
|
| 164 |
* Outputter: |
| 165 |
|
| 166 |
- XML Ouputter: patch #997006 contributed by Akos Maroy makes the |
| 167 |
'stand-alone' attribute of the XML header optional. |
| 168 |
See XmlOutputter::setStandalone() & XmlDocument::setStandalone(). |
| 169 |
|
| 170 |
- Better integration of compiler output for gcc on Mac OS X with Xcode |
| 171 |
(contributed by Claus Broch). |
| 172 |
|
| 173 |
* MFC Test Runner |
| 174 |
|
| 175 |
- Integration with VC++ 7.0 & 7.1. Double clicking on a failure will now |
| 176 |
to the failure location in the open IDE (no add-in necessary). |
| 177 |
This was contributed by Max Quatember and Andreas Pfaffenbichler. |
| 178 |
|
| 179 |
- Progress bar: now use system color to draw border |
| 180 |
(patch from bug #1165875 contributed by Pieter Van Dyck). |
| 181 |
|
| 182 |
* QT Test Runner |
| 183 |
|
| 184 |
- Fixed display of multi-line messages (patch contributed by Karol Szkudlarek). |
| 185 |
|
| 186 |
* Compilation: |
| 187 |
|
| 188 |
- The standard pkg-config file is now generated on unix (contributed by |
| 189 |
Robert Leight). |
| 190 |
|
| 191 |
- MinGW: patch #1024428 contributed by astar, fixed compilation issue in |
| 192 |
Win32DynamicLibraryManager.cpp. |
| 193 |
|
| 194 |
- MinGW, cygwin: enable build of shared library when using libtool. |
| 195 |
patch #1194394 contributed by Stéphane Fillod. |
| 196 |
|
| 197 |
- autotool: applied patch #1076398 contributed by Henner Sudek. Quote: |
| 198 |
"This patch allows AM_PATH_CPPUNIT to accept version |
| 199 |
numbers without minor and micro version. |
| 200 |
Now you can do: |
| 201 |
AM_PATH_CPPUNIT(1.9) |
| 202 |
instead of |
| 203 |
AM_PATH_CPPUNIT(1.9.0)" |
| 204 |
|
| 205 |
- Visual Studio 2005: removed deprecated warning. |
| 206 |
|
| 207 |
* Documentation: |
| 208 |
|
| 209 |
- Corrected many typos in cookbook and money example. Thanks to all |
| 210 |
those who helped ! |
| 211 |
|
| 212 |
* Bug Fix: |
| 213 |
|
| 214 |
- cppunit.m4: patch #946302, AM_PATH_CPPUNIT doesn't report result |
| 215 |
if CppUnit is missing. |
| 216 |
|
| 217 |
- Message/SourceLine: copy constructor have been specifically implemented |
| 218 |
to ensure they are thread-safe even if std::string copy constructor |
| 219 |
is not (usually on reference count based implementation). |
| 220 |
|
| 221 |
- TestResultCollector: fixed memory leak occuring when calling reset(). |
| 222 |
|
| 223 |
* Contrib: |
| 224 |
|
| 225 |
- added XSLT for compatibility with Ant junit xml formatter. |
| 226 |
Patch #1112053 contributed by Norbert Barbosa. |
| 227 |
See xml-xsl/cppunit2junit.xsl and cppunit2junit.txt for details. |
| 228 |
|
| 229 |
- xml-xsl/report.xsl has been fixed to work with current xml output. |
| 230 |
|
| 231 |
* (Possible) Compatiblity break: |
| 232 |
|
| 233 |
- All text output is now done on cout() instead of sometime cerr & |
| 234 |
sometime cout depending on the component. |
| 235 |
|
| 236 |
- OStringStream definition has been removed from Portability.h. This |
| 237 |
means that <sstream> is no longer included, and that ostringstream and |
| 238 |
string might not be defined. In practice this should have no impact |
| 239 |
since those includes have been moved to other CppUnit headers. |
| 240 |
|
| 241 |
* Notes: |
| 242 |
|
| 243 |
- CppUnit now uses the alias OStream when refering to std::ostream for |
| 244 |
portability. |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
New in CppUnit 1.10.2: |
| 249 |
---------------------- |
| 250 |
|
| 251 |
* Bug Fix: |
| 252 |
|
| 253 |
- Memory checker: bug #938753, array bound read in |
| 254 |
splitPathString() with substr if an empty string is passed. |
| 255 |
|
| 256 |
- Memory leaks: bug #952912, many memory leaks removed in the |
| 257 |
MFC test plug-in runner. |
| 258 |
|
| 259 |
- Crash when using CPPUNIT_TEST_SUITE_REGISTRATION with cppunit dll. |
| 260 |
Bug #921843. This bug was caused by a known STL bug in VC++ 6. |
| 261 |
See http://www.dinkumware.com/vc_fixes.html <xtree> issue with shared |
| 262 |
std::map in dll. |
| 263 |
|
| 264 |
* Compilation: |
| 265 |
|
| 266 |
- mingw & cigwin, bug #930338 & #945737 fixed. |
| 267 |
|
| 268 |
- make install does not work on SunOS. Bug #940650 fixed. |
| 269 |
|
| 270 |
- bug #933154, post-build step fails in directory with spaces |
| 271 |
with Visual C++. |
| 272 |
|
| 273 |
- DllPlugInTester, bug #941625 (char * string literal). Applied patch |
| 274 |
contribued by Curt Arnold. |
| 275 |
|
| 276 |
|
| 277 |
New in CppUnit 1.10.0 (same as 1.9.14): |
| 278 |
-------------------------------------- |
| 279 |
|
| 280 |
* Assertions |
| 281 |
|
| 282 |
- Ported exception assertion macros from cppunit 2 to the 1.9.x series: |
| 283 |
CPPUNIT_ASSERT_THROW, CPPUNIT_ASSERT_NO_THROW, |
| 284 |
CPPUNIT_ASSERT_ASSERTION_FAIL, CPPUNIT_ASSERT_ASSERTION_PASS. |
| 285 |
|
| 286 |
* Deprecated: |
| 287 |
|
| 288 |
- The helper macros: CPPUNIT_TEST_FAIL & CPPUNIT_TEST_EXCEPTION have |
| 289 |
been deprecated. Use the new exception assertion macros instead. |
| 290 |
|
| 291 |
* Bug Fix: |
| 292 |
|
| 293 |
- cppunit-config: bug #903363, missing -ldl from the output of |
| 294 |
cppunit-config --libs. Fixed thanks Eric Blossom patch. |
| 295 |
|
| 296 |
- test plug-in(unix): Adding RTLD_GLOBAL allows test plug-ins |
| 297 |
to provide symbols to shared objects they load themselves. |
| 298 |
Thanks goes to Gareth Sylvester for this patch (#816563). |
| 299 |
|
| 300 |
|
| 301 |
New in CppUnit 1.9.12: |
| 302 |
--------------------- |
| 303 |
|
| 304 |
* Test Plug-in |
| 305 |
|
| 306 |
- added support contributed support for UNIX systems that |
| 307 |
have libdld and not libdl (e.g. hp-ux). Contributed by |
| 308 |
Abdessattar Sassi. |
| 309 |
|
| 310 |
* RTTI |
| 311 |
|
| 312 |
- TypeInfoHelper now used gcc c++ abi to demangle typeinfo name thanks to |
| 313 |
Neil Ferguson contribution. |
| 314 |
|
| 315 |
* Bug Fix: |
| 316 |
|
| 317 |
- MFC TestRunner: integrated bug fix from Tim Threlkeld for bug |
| 318 |
#610191 and #610162. Fixed assertion when minizing dialog |
| 319 |
(bug #643612). |
| 320 |
|
| 321 |
- XMLOutputter: Fixed bug #676505: no space inserted between attributes |
| 322 |
of XmlElement. |
| 323 |
|
| 324 |
- CppUnit portability: fixed many mistakes relating to compilation |
| 325 |
without type info or namespace reported by Philip Craig. |
| 326 |
|
| 327 |
- Missing destructor with no throw specification for |
| 328 |
DynamicLibraryManagerException. Bug #619059. |
| 329 |
|
| 330 |
- Fixed missing export for operator <<(TextTestResult). Bug #610119. |
| 331 |
|
| 332 |
- Missing include for typeinfo in TestNamer.h. Bug #662666. |
| 333 |
|
| 334 |
* Compilation |
| 335 |
|
| 336 |
- Fixed compilation issues for Borland C++ 6 and STLPort. Bug #694971, |
| 337 |
#699794 and #662666. |
| 338 |
|
| 339 |
- Fixed compilation issues for AIX. |
| 340 |
|
| 341 |
- Fixed compilation issues for Visual C++ .NET 2002. |
| 342 |
|
| 343 |
- Fixed doxygen usage in mingw environment (space not allowed in |
| 344 |
doxygen path). Bug #700730. |
| 345 |
|
| 346 |
- Fixed compilation issue for mingw (bug #711583). |
| 347 |
|
| 348 |
|
| 349 |
New in CppUnit 1.9.10: |
| 350 |
--------------------- |
| 351 |
|
| 352 |
- Major portability improvement |
| 353 |
- Protector |
| 354 |
- HelperMacros |
| 355 |
- MFC TestRunner bug fixes |
| 356 |
- Failure diagnostic |
| 357 |
- Asserter |
| 358 |
|
| 359 |
* Major portability improvement: |
| 360 |
|
| 361 |
- Much work has been done to reduce C++ feature requirement to compile |
| 362 |
CppUnit. It should now be possible to compile CppUnit on most |
| 363 |
compilers, as long as STL are available (in std namespace or not), |
| 364 |
with some form of strstream and iostream, as well as exception support. |
| 365 |
See CodingGuideLines.txt for details. |
| 366 |
|
| 367 |
* Protector |
| 368 |
|
| 369 |
- Protector can be passed to the TestResult to 'protect' call to |
| 370 |
setUp(), runTest() and tearDown() method. With this, it is easy to |
| 371 |
capture exceptions which do not have std::exception as a base class, |
| 372 |
such as CException or RWXMsg for example. TestResult and Protector |
| 373 |
class documentation. Look at src/cppunit/DefaultProtector.cpp for |
| 374 |
an example of implementation. |
| 375 |
|
| 376 |
* Helper macros |
| 377 |
|
| 378 |
- Mostly rewritten. It no longer use TestSuiteBuilder. A new object |
| 379 |
TestSuiteBuilderContext was introduced. It is used to name test case, |
| 380 |
create test fixture instance and add test to the fixture suite. It |
| 381 |
is now much more easier to add custom test cases using |
| 382 |
CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS. Should also prevent most |
| 383 |
compability break concerning that macro. |
| 384 |
|
| 385 |
- Useful typedef are now public: TestFixtureType, ParentTestFixtureType. |
| 386 |
|
| 387 |
- New typedef for custom test method parameter: |
| 388 |
typedef TestSuiteBuilderContext<TestFixtureType> |
| 389 |
TestSuiteBuilderContextType; |
| 390 |
|
| 391 |
- added support for abstract test fixture with |
| 392 |
CPPUNIT_TEST_SUITE_END_ABSTRACT(). See documentation for further |
| 393 |
detail. |
| 394 |
|
| 395 |
* Failure diagnostic |
| 396 |
|
| 397 |
- setUp() and tearDown() now provides a detailed diagnostic of the |
| 398 |
failure (assertion, exception...) |
| 399 |
|
| 400 |
- If RTTI is allowed to extract type info, CppUnit will report the |
| 401 |
actual exception type in the diagnostic. |
| 402 |
|
| 403 |
* Asserter: |
| 404 |
|
| 405 |
- A new AdditionalMessage class has been introduced. It is used for |
| 406 |
assertion that takes an additional 'message' argument |
| 407 |
(CPPUNIT_ASSERT_MESSAGE...). Since this macro has an implicit |
| 408 |
constructor that take a string, which creates a Message with the |
| 409 |
specified string as detail. That way, additional message can be a |
| 410 |
single string or a complex Message object. See documentation for |
| 411 |
example of use. |
| 412 |
|
| 413 |
* Bug Fix: |
| 414 |
|
| 415 |
- MFC TestRunner: bug #530426 (conflict between TestRunner and host |
| 416 |
application's resources). A huge thanks to Steven Mitter for that one. |
| 417 |
|
| 418 |
- MFC TestRunner: Browse button is now disabled while running test. |
| 419 |
|
| 420 |
* Deprecated |
| 421 |
|
| 422 |
- CppUnit::TextUi::TestRunner moved to CppUnit::TextTestRunner. |
| 423 |
- CppUnit::MfcUi::TestRunner moved to CppUnit::MfcTestRunner. |
| 424 |
- CppUnit::QtUi::TestRunner moved to CppUnit::QtTestRunner. |
| 425 |
|
| 426 |
* Compatiblity break: |
| 427 |
|
| 428 |
- CppUnitTextUi::TestRunner, removed runTestByName() and runTest(). |
| 429 |
- TestSuiteBuilder: removed templatized method |
| 430 |
addTestCallerForException(). See implementation of |
| 431 |
CPPUNIT_TEST_EXCEPTION implementation for an alternative. |
| 432 |
- TestAssert: removed deprecated functions (those not using SourceLine) |
| 433 |
assertImplementation(), assertNotEqualImplementation(), |
| 434 |
assertEquals(). Moved non deprecated functions assertEquals() and |
| 435 |
assertEquals() into CppUnit namespace. |
| 436 |
- Plug-ins 'Parameters' typedef has been replaced by class |
| 437 |
PlugInParameters. The method commandLine() returns what used to be in |
| 438 |
Parameters[0]. This should avoid future compatibility break when the |
| 439 |
parameters passing API will be defined. |
| 440 |
- TestPlugIn::initialize() now takes a PlugInParameters in argument |
| 441 |
instead of a Parameters. |
| 442 |
- template <class T> void assertEquals() no longer has a default message |
| 443 |
value (no impact, unless you used this function directly instead of |
| 444 |
assertion macros). |
| 445 |
- HelperMacros: renamed CPPUNIT_TEST_ADD to |
| 446 |
CPPUNIT_TEST_SUITE_ADD_TEST. |
| 447 |
- HelperMacros: removed CPPUNIT_TEST_CUSTOM. Instead use |
| 448 |
CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS and call context.addTest() |
| 449 |
passing the test that was returned. |
| 450 |
- HelperMacros: renamed CPPUNIT_TEST_CUSTOMS to |
| 451 |
CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS. Changed method signature to |
| 452 |
static void aMethodName( TestSuiteBuilderContextType &context ). |
| 453 |
You can replace the 3 previous parameters by context. (See |
| 454 |
documentation for further detail). |
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
New in CppUnit 1.9.8: |
| 459 |
--------------------- |
| 460 |
|
| 461 |
- New custom test macros for fixture suite |
| 462 |
- Exception message are now structured |
| 463 |
- Added detail field to MFC TestRunner |
| 464 |
- New XmlDocument class to easily create new XML output format |
| 465 |
- XmlOutputter customization |
| 466 |
- Test plug-in XMLOutputter hook |
| 467 |
- ClockerPlugIn example includes test time in XML output |
| 468 |
- DllPlugInTester allows test plug-in to hook the XmlOutputter |
| 469 |
- Configurable CompilerOutputter wrapping |
| 470 |
|
| 471 |
* New custom test macros |
| 472 |
|
| 473 |
- 3 new macros have been added for use when declaring test fixture suite: |
| 474 |
- CPPUNIT_TEST_CUSTOM : to specify a method that returns an instance of |
| 475 |
Test to add to the suite |
| 476 |
- CPPUNIT_TEST_CUSTOM : to specify a method that add some tests to the |
| 477 |
suite |
| 478 |
- CPPUNIT_TEST_ADD : to add a test to the suite. Used this to create custom |
| 479 |
CPPUNIT_TEST_xxx macros. |
| 480 |
|
| 481 |
See macros documentation for examples and details. |
| 482 |
|
| 483 |
* Exception message |
| 484 |
|
| 485 |
- Exception message are now stored in a Message object instead of a string. |
| 486 |
A message is composed of two items: |
| 487 |
- a short description (~20/30 characters) |
| 488 |
- a list of detail strings |
| 489 |
|
| 490 |
The short description is used to indicate how the detail strings should be |
| 491 |
interpreted. It usually indicates the failure types, such as |
| 492 |
"assertion failed", "forced failure", "unexpected exception caught", |
| 493 |
"equality assertion failed"... It should not contains new line characters |
| 494 |
(\n). |
| 495 |
|
| 496 |
Detail strings are used to provide more information about the failure. It |
| 497 |
can contains the asserted expression, the expected and actual values in an |
| 498 |
equality assertion, some addional messages... Detail strings can contains |
| 499 |
new line characters (\n). |
| 500 |
|
| 501 |
This change allow ouputters to deal with all failure the same way (there is |
| 502 |
no special case for the equality assertion any more). |
| 503 |
|
| 504 |
* New XmlDocument class to easily create new XML output format |
| 505 |
|
| 506 |
- Classes XmlDocument and XmlElement where extracted from XmlOutputter. This |
| 507 |
help writing outputters that use a completly different XML format. |
| 508 |
|
| 509 |
- XmlDocument represents a XML file, and XmlElement represents a XML element. |
| 510 |
|
| 511 |
* XmlOutputter customization |
| 512 |
|
| 513 |
- Xml output can be customized using XmlOutputterHook. To do so, subclass |
| 514 |
XmlOutputterHook and register it to the XmlOutputter with addHook() before |
| 515 |
call XmlOutputter::write(). |
| 516 |
|
| 517 |
Hook can be used to add some datas to the XmlDocument or the XmlElement of |
| 518 |
a specific hook. Methods have been added to XmlElement to help navigating |
| 519 |
and modifying the XmlDocument. |
| 520 |
|
| 521 |
See ClockerPlugIn example. |
| 522 |
|
| 523 |
* MFC TestRunner |
| 524 |
|
| 525 |
- The name of the test is displayed just before being run. |
| 526 |
- Browse Test Hierarchy dialog is resizable. |
| 527 |
- Better (and cleaner) handling of windows resizing |
| 528 |
- Failure list now only show the short description of the failure. |
| 529 |
- Edit field added to display the details of the selected failure. |
| 530 |
|
| 531 |
* MFC test plug-in runner (TestPlugInRunner): |
| 532 |
|
| 533 |
- command line: a dll name can be specified on the command after -testsuite: |
| 534 |
example: TestPlugInRunnerd.exe -testsuite Simpled.dll |
| 535 |
|
| 536 |
- Layout configuration is stored/restored. |
| 537 |
|
| 538 |
* Test plug-in XML output Hook |
| 539 |
|
| 540 |
- TestPlugIn interface provides a mean for plug-in to register hook for |
| 541 |
XML output. Practically, this allow plug-in to add specific data to the |
| 542 |
output. See ClockerPlugIn example, which add timing datas to the xml |
| 543 |
output. |
| 544 |
|
| 545 |
* DllPlugInTester: |
| 546 |
|
| 547 |
- added option -w / --wait to wait for the user to press a key before exiting. |
| 548 |
|
| 549 |
- plug-in can now provides XmlOutputterHook to add specific datas to the |
| 550 |
XML ouput. See ClockerPlugIn example. |
| 551 |
|
| 552 |
* CompilerOutputter wrapping is parametrized |
| 553 |
|
| 554 |
- Wrap column can be set with setWrapColumn(). Default is now 79 instead of 80. |
| 555 |
|
| 556 |
- Wrapping can be disabled with setNoWrap(). |
| 557 |
|
| 558 |
* Examples: |
| 559 |
|
| 560 |
- ClockerPlugIn: the example now use the new XmlOutputterHook. Test time are |
| 561 |
now included in the XML output. See examples/ClockerPlugIn/ReadMe.txt for |
| 562 |
details. |
| 563 |
|
| 564 |
* Bug Fix: |
| 565 |
|
| 566 |
- CompilerOutputter: fixed wrapping issues (UT magic!) |
| 567 |
|
| 568 |
- DllPlugInTester: use ISO-LATIN1 encoding if none is given. Flag --xsl was |
| 569 |
ignored. |
| 570 |
|
| 571 |
- MfcUi plug-in runner (TesTPlugInRunner): better handling of history when |
| 572 |
loading and reloading a dll. |
| 573 |
|
| 574 |
- Qt Test Runner: minor bug fixes. Should compile on Unix. |
| 575 |
|
| 576 |
- XmlOutputter: use the default encoding if an empty string is given as |
| 577 |
encoding |
| 578 |
|
| 579 |
* Compatibility Break: |
| 580 |
|
| 581 |
- CompilerOutputter: removed printNotEqualMessage() and printDefaultMessage(). |
| 582 |
No longer needed since Exception message are processed in a generic way. |
| 583 |
Removed wrap(). Extracted to StringTools. |
| 584 |
|
| 585 |
- Exception constructor takes a Message instead of a string. Notes that the |
| 586 |
first argument in Message constructor is a short description, not the message. |
| 587 |
Therefore, the change will usualy have the following form: |
| 588 |
Exception( Message( "assertion failed", oldMessage ) ); |
| 589 |
You may want to use Asserter functions instead of constructing and throwing |
| 590 |
the exception manually. |
| 591 |
|
| 592 |
- TestPlugInAdapter: renamed TestPlugInDefaultImpl. |
| 593 |
|
| 594 |
- TestSuiteBuilder: removed default constructor. All remaining constructors |
| 595 |
take an additional argument of type TestNamer used to specify the fixture |
| 596 |
named and generate test case name. Remove template method |
| 597 |
addTestCallerForException(). Use addTest() instead (see |
| 598 |
CPPUNIT_TEST_EXCEPTION implementation). |
| 599 |
|
| 600 |
- TextTestResult: most printing method were removed. This task is now delegated |
| 601 |
to TextOuputter. |
| 602 |
|
| 603 |
- XmlElement: renamed addNode() to addElement(). |
| 604 |
|
| 605 |
- XmlOutputter: removed methods writeProlog() and writeTestResult() which |
| 606 |
are replaced by XmlDocument. Renamed makeRootNode() to setRootNode(). It |
| 607 |
no longer returns the root node, but set the root node of the XML document. |
| 608 |
|
| 609 |
- XmlOuputter::Node: class has been extracted and renamed XmlElement. |
| 610 |
|
| 611 |
* Deprecated: |
| 612 |
|
| 613 |
- Asserter: all functions that use a string for the failure message. Construct |
| 614 |
a Message instead (see Exception constructor compatiblity break and |
| 615 |
Exception message feature). |
| 616 |
|
| 617 |
|
| 618 |
New in CppUnit 1.9.6: |
| 619 |
--------------------- |
| 620 |
|
| 621 |
- DllPlugInTester can be parametrized from command line |
| 622 |
- Two test listener plug-in examples |
| 623 |
- An 'hello world' example & getting started document : Money |
| 624 |
- Contribution: generic makefile for Borland 5.5 free compiler. |
| 625 |
- Bug fixes |
| 626 |
|
| 627 |
* DllPlugInTester: |
| 628 |
|
| 629 |
- Advanced command line to support miscellaneous listener outputer. |
| 630 |
Parameters can now be passed to test plug-in: |
| 631 |
|
| 632 |
-c --compiler |
| 633 |
Use CompilerOutputter |
| 634 |
-x --xml [filename] |
| 635 |
Use XmlOutputter (if filename is omitted, then output to cout or |
| 636 |
cerr. |
| 637 |
-s --xsl stylesheet |
| 638 |
XML style sheet for XML Outputter |
| 639 |
-e --encoding encoding |
| 640 |
XML file encoding (UTF8, shift_jis, ISO-8859-1...) |
| 641 |
-b --brief-progress |
| 642 |
Use BriefTestProgressListener (default is TextTestProgressListener) |
| 643 |
-n --no-progress |
| 644 |
Show no test progress (disable default TextTestProgressListener) |
| 645 |
-t --text |
| 646 |
Use TextOutputter |
| 647 |
-o --cout |
| 648 |
Ouputters output to cout instead of the default cerr. |
| 649 |
filename[="options"] |
| 650 |
Many filenames can be specified. They are the name of the |
| 651 |
test plug-ins to load. Optional plug-ins parameters can be |
| 652 |
specified after the filename by adding '='. |
| 653 |
[:testpath] |
| 654 |
Optional. Only one test path can be specified. It must |
| 655 |
be prefixed with ':'. See TestPath constructor for syntax. |
| 656 |
|
| 657 |
'parameters' (test plug-in or XML filename, test path...) may contains |
| 658 |
spaces if double quoted. Quote may be escaped with \". |
| 659 |
|
| 660 |
Some examples of command lines: |
| 661 |
DllPlugInTesterd_dll.exe -b -x tests.xml -c simple_plugind.dll CppUnitTestPlugInd.dll |
| 662 |
Will load 2 tests plug-ins (available in lib/), use the brief test |
| 663 |
progress, output the result in XML in file tests.xml and also |
| 664 |
output the result using the compiler outputter. |
| 665 |
|
| 666 |
DllPlugInTesterd_dll.exe ClockerPlugInd.dll="flat" -n CppUnitTestPlugInd.dll |
| 667 |
Will load the 2 test plug-ins, and pass the parameter string "flat" |
| 668 |
to the Clocker plug-in, disable test progress. Clocker being a test |
| 669 |
listener plug-ins (it doesn't implements any tests, it just register |
| 670 |
a TestListener), this is equivalent to say 'run all the test |
| 671 |
of CppUnitTestPlugIn and use ClockerPlugIn as a TestLisener'. |
| 672 |
|
| 673 |
DllPlugInTesterd_dll.exe CppUnitTestPlugInd.dll :Core |
| 674 |
Will run the test named "Core" (a suite in the present case ) of the |
| 675 |
test plug-in. |
| 676 |
|
| 677 |
* Documentation |
| 678 |
|
| 679 |
- New getting started documentation. Not completed yet, but probably |
| 680 |
a good complement to the current cookbook. Explore the creation |
| 681 |
of the Money example. |
| 682 |
|
| 683 |
* Examples |
| 684 |
|
| 685 |
- Money (examples/Money): the 'hello world' example. Unit tests for |
| 686 |
a simple Money class. |
| 687 |
|
| 688 |
- DllPlugInTesterTest (src/DllPlugInTester/DllPlugInTester.dsp): |
| 689 |
unit tests for CommandLineParser. Not really an example, but only |
| 690 |
slightly more complex than Money. |
| 691 |
|
| 692 |
- ClockerPlugIn (examples/ClockerPlugIn): a test listener plug-in |
| 693 |
that track tests and test suites running time. Parameter: "flat" |
| 694 |
for a reporting with a flattened tree. |
| 695 |
|
| 696 |
- DumperPlugIn (examples/DumperPlugIn): a test listener plug-in that |
| 697 |
dump the test tree as it run. Paramater: "flat" for a reporting |
| 698 |
with a flattened tree. |
| 699 |
|
| 700 |
- CppUnitTestPlugIn (examples/cppunitest/CppUnitTestPlugIn.dsp): |
| 701 |
CppUnit's test suite as a test plug-in. |
| 702 |
|
| 703 |
* Contribution |
| 704 |
|
| 705 |
- Contributed by project cuppa team (http://sourceforge.jp/projects/cuppa/): |
| 706 |
|
| 707 |
- Makefile for CppUnit with Borland C++ 5.5 free compiler: does not |
| 708 |
depend on a specific CppUnit version. |
| 709 |
|
| 710 |
* Compatiblity breaks |
| 711 |
|
| 712 |
- DllPlugInTester: (1.9.4 only), should add -c to DllPlugInTester |
| 713 |
command line. |
| 714 |
|
| 715 |
* Bug Fix: |
| 716 |
|
| 717 |
- DynamicLibaryManager did not report the library name when loading a |
| 718 |
a library. |
| 719 |
|
| 720 |
- BeosDynamicLibraryManager: fixed thanks to Shibu Yoshiki |
| 721 |
('cuppa' project team). |
| 722 |
|
| 723 |
- Broken build on Unix should be fixed for most (thanks to |
| 724 |
Jeffrey Morgan). |
| 725 |
|
| 726 |
|
| 727 |
New in CppUnit 1.9.4: |
| 728 |
---------------------- |
| 729 |
|
| 730 |
- More versatile, easier to make test plug-in. |
| 731 |
- A PlugInManager to manage multiple test plug-ins. |
| 732 |
- Crossplatform test plug-in runner. |
| 733 |
- Crossplatform test plug-in example. |
| 734 |
- A brief progress listener |
| 735 |
- Easier test hierarchy creation |
| 736 |
- Improved documentation. |
| 737 |
- Tracking of test run start/end. |
| 738 |
- Contribution: XML style sheet & borland 5.5 makefile. |
| 739 |
- Help needed on the Unix side! |
| 740 |
|
| 741 |
* Buildling on Unix: |
| 742 |
|
| 743 |
- I did not get any feed back on the previous build issue on Unix. Using |
| 744 |
a simple autobook example was useless to try to solve the problem. Here |
| 745 |
is the issue: |
| 746 |
|
| 747 |
CppUnit library build fine, it is the example I'm having trouble with. |
| 748 |
|
| 749 |
Since the test plug-in have been added, CppUnit use the function |
| 750 |
dlopen(), dlsym() and dlclose() on unix to load/unload the plug-in. |
| 751 |
|
| 752 |
Those functions apparently requires to link another library when |
| 753 |
building an exectuable. Here is was should be done: |
| 754 |
- linking against the said library for each example. |
| 755 |
- generates the shared library for the examples/simple/simple_plugin |
| 756 |
example (source files are ExampleTestCase.cpp, ExampleTestCase.cpp |
| 757 |
and SimplePlugIn.cpp). |
| 758 |
- if possible, makes the above optionnal if --disable-test-plug-in |
| 759 |
is defined: |
| 760 |
- don't link the dlXXX library |
| 761 |
- don't compile the plug-in example |
| 762 |
- add #define CPPUNIT_NO_TESTPLUGIN 1 to the config file |
| 763 |
|
| 764 |
Contact me on the mailing-list for more details. |
| 765 |
|
| 766 |
* TestPlugIn: |
| 767 |
|
| 768 |
- A simple fact I realised while testing: if you link your test plug-in |
| 769 |
against the DLL version of cppunit (or shared library on Unix), then |
| 770 |
test registered to the TestFactoryRegistry (it is what's hide behind |
| 771 |
CPPUNIT_TEST_SUITE_REGISTRATION) are automatically shared. Changes |
| 772 |
have been made to support that usage (CppUnit was crashing badly). |
| 773 |
Using the TestFactoryRegistry provides much more flexiblity that |
| 774 |
providing a single suite for the plug-in. As such: |
| 775 |
|
| 776 |
- CppUnit plug-in should be linked against the dll version of CppUnit library. |
| 777 |
|
| 778 |
- Plug-in should register their tests using the CPPUNIT_TEST_SUITE_xxx macros. |
| 779 |
|
| 780 |
- 'homemade' suite can still be registred to the TestFactoryRegistry that is |
| 781 |
passed as parameter on plug-in initialization. Notes that you must |
| 782 |
unregister those suites during plug-in uninitialization, otherwise on |
| 783 |
destruction, the TestFactoryRegistry will attempt to destroy them... Your |
| 784 |
plug-in would have been already unloaded... |
| 785 |
|
| 786 |
- Plug-in can accept parameters on initialization (notes that the Parameters |
| 787 |
object is far from being stabilized, but whatever form it takes, it will be |
| 788 |
a list of string). |
| 789 |
|
| 790 |
- Plug-in can register their one listener for a test run. This means that you |
| 791 |
can extends 'DllPlugInTester' by creating test plug-in... This also means |
| 792 |
than you can listen to startTestRun()/endTestRun() to do some global |
| 793 |
setUp/tearDown (to initialize globales resources, such as COM...) |
| 794 |
|
| 795 |
- Why all this fuss around test plug-in ? Test plug-in are the incarnation of |
| 796 |
an old concept: testable components... |
| 797 |
|
| 798 |
* PlugInManager: |
| 799 |
|
| 800 |
- The PlugInManager is used to load/unload plug-ins. It takes care of all |
| 801 |
the 'plug-in' protocol and makes it easy to use multiple plug-ins at the |
| 802 |
same time. It dispatches the addListener()/removeListener() message to |
| 803 |
each plug-in. |
| 804 |
|
| 805 |
* Crossplatform test plug-in runner (src/DllPlugInRunner): |
| 806 |
|
| 807 |
- This application can be used to run your test plug-ins. It can load |
| 808 |
multiple test plug-ins and run all or a specific test in the test |
| 809 |
hierarchy returned by TestFactoryRegistry::getRegistry().makeTest(). |
| 810 |
|
| 811 |
- Plug-in loaded by the plug-in may also be custom TestListener. |
| 812 |
|
| 813 |
- It can be use for post-build check and to debug the plug-in. |
| 814 |
|
| 815 |
- Why use it? It keep you away from CppUnit API changes! |
| 816 |
|
| 817 |
* Easier test hierarchy creation (TestFactoryRegistry/HelperMacros): |
| 818 |
|
| 819 |
- added method addRegistry(name) to add a named registry to the registry. |
| 820 |
see TestFactoryRegistry for an example of use. |
| 821 |
|
| 822 |
- added macros CPPUNIT_REGISTRY_ADD( which, to ) and |
| 823 |
CPPUNIT_REGISTRY_ADD_TO_DEFAULT( which ) to create test hierarchy at static |
| 824 |
initialization (in the spirit of CPPUNIT_TEST_SUITE_xxx() macros). |
| 825 |
|
| 826 |
* VerboseTestProgressListener: |
| 827 |
|
| 828 |
- A new TestListener that prints the test name before running it. Most useful when |
| 829 |
a test crashing, mean a application crash. |
| 830 |
|
| 831 |
* Documentation: |
| 832 |
|
| 833 |
- More details about the test plug-in, how to use it, how does it works... |
| 834 |
See module/Writing Test Plug-in. |
| 835 |
|
| 836 |
* Examples: |
| 837 |
|
| 838 |
- examAdded crossplatform simple example. Equivalent to VC++ HostApp example. |
| 839 |
- examples/simple: a very simple example, demonstrating the use of CppUnit |
| 840 |
with a single TestFixture. Demonstrate both how to build an application |
| 841 |
using TestRunner, and how to build a test plug-in to use with the |
| 842 |
test plug-in runner. |
| 843 |
|
| 844 |
* Contribution |
| 845 |
|
| 846 |
- Contributed by project cuppa team (http://sourceforge.jp/projects/cuppa/): |
| 847 |
|
| 848 |
- XML style sheet: transform CppUnit XML output into HTML. |
| 849 |
- Makefile for CppUnit with Borland C++ 5.5 free compiler. |
| 850 |
|
| 851 |
* Behavior changes: |
| 852 |
|
| 853 |
- Test runner should call TestResult::runTest() to run the 'top level' test. This |
| 854 |
will inform the TestListener of the test run start/end. |
| 855 |
|
| 856 |
* Compatiblity break: |
| 857 |
|
| 858 |
- TestFactoryRegistry don't own register test anymore. AutoRegisterSuite has |
| 859 |
been updated to preverse its apparent behavior. It should be of concern |
| 860 |
if you created and registered custom TestFactory. |
| 861 |
|
| 862 |
- Removed TextTestProgressListener::done(). No longer needed, it listens |
| 863 |
for endTestRun(). |
| 864 |
|
| 865 |
* Compatiblity Break for 1.9.2 users: |
| 866 |
|
| 867 |
- TestPlugIn.h: CppUnitTestPlugIn as been completly rewritten. |
| 868 |
|
| 869 |
- TestPlugIn.h: macro CPPUNIT_PLUGIN_IMPLEMENT() don't take any arguments. |
| 870 |
|
| 871 |
- TestSuitePlugIn: removed. A similar functionnality is provided by |
| 872 |
PlugInManager. |
| 873 |
|
| 874 |
- TestPlugInDefaultImpl: renamed TestPlugInAdapter. It does not implements |
| 875 |
any default behavior anymore. |
| 876 |
|
| 877 |
- DllPlugInRunner: no longer support multiple specific tests. The test path must |
| 878 |
be prefixed with ':'. Release and Debug configuration links against cppunit_dll. |
| 879 |
|
| 880 |
* Bug Fix: |
| 881 |
|
| 882 |
- Crash when linking CppUnit DLL within another DLL that registered test. Caused |
| 883 |
by the destruction of tests registered to TestFactoryRegistry. Fixed by |
| 884 |
providing a register/unregister interface and removing the ownership of |
| 885 |
TestFactory to TestFactoryRegistry. |
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
New in CppUnit 1.9.2: |
| 890 |
---------------------- |
| 891 |
|
| 892 |
In short: |
| 893 |
- Cleaner XML output |
| 894 |
- Crossplatform Test plug-in |
| 895 |
- TestPlugInSuite to wrap test plug-in |
| 896 |
- More TestPlugIn documentation. |
| 897 |
|
| 898 |
* TestPlugIn: |
| 899 |
- The test plug-in functionnality has been rewritten from scrash. |
| 900 |
TestPlugIn related macro are now crossplatform (exporting the plug-in |
| 901 |
function from the dynamic library...). |
| 902 |
|
| 903 |
- Class DynamicLibraryManager provides a generic way to access dynamic |
| 904 |
library. Platform specific implementation provided for WIN32, unix, BeOs. |
| 905 |
Can be very easily ported to new platform. |
| 906 |
|
| 907 |
- A More flexible and hopefully extensible interface has been introduced |
| 908 |
(CppUnitPlugIn). |
| 909 |
|
| 910 |
- A default implementation using the test factory registry is provided |
| 911 |
(TestPlugInDefaultImpl). Can be easily customized. |
| 912 |
|
| 913 |
- The one line test plug-in declaration was renamed CPPUNIT_PLUGIN_IMPLEMENT. |
| 914 |
|
| 915 |
See modules/Writing Test Plug-in documentation and examples/EasyTestPlugIn. |
| 916 |
|
| 917 |
* XmlOutputter: |
| 918 |
|
| 919 |
- XML output is now indented. Nodes that don't have children are one line |
| 920 |
tag. The output can now easily be read. |
| 921 |
|
| 922 |
* Compatibility break: |
| 923 |
|
| 924 |
- class TestSucessListener was renamed to TestSuccessListener. |
| 925 |
|
| 926 |
- XmlOutput: renamed tag <SuccessfulTests> to <SuccessfulTests> |
| 927 |
|
| 928 |
- Global fix of the 'success' typo (was misspelled 'sucess'). Main impacts are listed |
| 929 |
above, but check your own code in case you override some protected/private methods. |
| 930 |
|
| 931 |
- TestPlugInInterface (include/msvc6/TestPlugInInterface.h): this header and class |
| 932 |
are now obsolete. You should use include/cppunit/plugin/TestPlugIn.h instead. |
| 933 |
Macro CPPUNIT_TESTPLUGIN_IMPL have been replaced by CPPUNIT_PLUGIN_IMPLEMENT. |
| 934 |
|
| 935 |
- TestDecorator inherits Test instead of TestLeaf. |
| 936 |
|
| 937 |
- DllPlugInTester only run DLL implementing the new new TestPlugIn interface. |
| 938 |
|
| 939 |
|
| 940 |
New in CppUnit 1.9.0: |
| 941 |
---------------------- |
| 942 |
|
| 943 |
In short: |
| 944 |
- Exploration of the test hierarchy without RTTI support |
| 945 |
- Utility methods to find a test in the hierarchy |
| 946 |
- TestPath to store/load the path to a specific test in the hierarchy |
| 947 |
- Generic TestRunner |
| 948 |
- Style sheet support added to XML ouput. |
| 949 |
- CompilerOutputter supports run-time parametrization of error location format. |
| 950 |
- Tracking of test suite run. |
| 951 |
- Debugging and post-build testing of DLL using DllPlugInTester. |
| 952 |
- Easy creation a test plug-in and test plug-in new example |
| 953 |
|
| 954 |
* Test: |
| 955 |
|
| 956 |
- Exploration of the test hierarchy without RTTI support: |
| 957 |
Added Test::getChildTestCount() and Test::getChildTestAt() to walk the test hierarchy |
| 958 |
without RTTI. |
| 959 |
|
| 960 |
- Utility methods to find a test in the hierarchy: |
| 961 |
Added Test::findTest(), Test::findTestPath() and Test::resolveTestPath(). |
| 962 |
|
| 963 |
* TestPath: |
| 964 |
|
| 965 |
- A new class that store the path to a specific test (list of pointer). Can be |
| 966 |
converted into a string and constructed from a string. Typically used with |
| 967 |
TestRunner. |
| 968 |
|
| 969 |
* TestListener: |
| 970 |
|
| 971 |
- Added startSuite() and endSuite() callback that are called before and after a |
| 972 |
test suite runs its child tests. See TestListener for detail and new example. |
| 973 |
|
| 974 |
* CompilerOutputter: |
| 975 |
|
| 976 |
- Support run-time parametrization of compiler error format. Support for gcc error |
| 977 |
format added. See CompilerOutputter::setLocationFormat(). |
| 978 |
|
| 979 |
* XmlOutputter: |
| 980 |
|
| 981 |
- Added style sheet support. |
| 982 |
|
| 983 |
- XML structure change (see Compatibility break) |
| 984 |
|
| 985 |
* DllPlugInTester: (src/msvc6/DllPlugInTester, in src/CppUnitLibraries.dsw) |
| 986 |
|
| 987 |
- An application to load a DLL test plug-in and run the specified test. Test |
| 988 |
result are reported using a CompilerOutputter. It can be used for post-build |
| 989 |
testing, but to debug DLL too! See examples/msvc6/TestPlugIn/TestPlugIn.dsp |
| 990 |
which demonstrate both. |
| 991 |
|
| 992 |
* TestPlugInInterface (include/msvc6/TestPlugInInterface.h): |
| 993 |
|
| 994 |
- Easy creation a test plug-in with the new macro CPPUNIT_TESTPLUGIN_IMPL |
| 995 |
that implements and exports everything for you. |
| 996 |
See examples/msvc6/EasyTestPlugIn for an example. |
| 997 |
|
| 998 |
|
| 999 |
* Compatibility break: |
| 1000 |
|
| 1001 |
- Test::toString() has been removed. Applies to all subclass of Test. |
| 1002 |
It was not used by the framework and was source of confusion with getName(). |
| 1003 |
|
| 1004 |
- TestCase::run(void) and TestCase::defaultResult() have been removed. Using the |
| 1005 |
run() method with a TestResult instead. |
| 1006 |
|
| 1007 |
- XmlOutput: added a message element to the XML structure. The message associated |
| 1008 |
to a failure is now in the content of <Message> element instead of in the content |
| 1009 |
of the <FailedTest> element. |
| 1010 |
Changed from: |
| 1011 |
<FailedTest id="6"> |
| 1012 |
<Name>test6</Name> |
| 1013 |
<FailureType>Error</FailureType> |
| 1014 |
error2 |
| 1015 |
</FailedTest> |
| 1016 |
To: |
| 1017 |
<FailedTest id="6"> |
| 1018 |
<Name>test6</Name> |
| 1019 |
<FailureType>Error</FailureType> |
| 1020 |
<Message>error2</Message> |
| 1021 |
</FailedTest> |
| 1022 |
|
| 1023 |
|
| 1024 |
* Deprecated: |
| 1025 |
|
| 1026 |
- CompilerOutputter::defaultOutputter(): use default constructor instead. |
| 1027 |
|
| 1028 |
|
| 1029 |
* Bug fix: |
| 1030 |
|
| 1031 |
- XmlOutputter: did not escape content (bug #540944). |
| 1032 |
|
| 1033 |
- Included qt/examples in distribution |
| 1034 |
|
| 1035 |
- Removed dependency of MfcTestRunner on DSPlugIn. It should now compile with |
| 1036 |
VC++ 7. |
| 1037 |
|
| 1038 |
|
| 1039 |
New in CppUnit 1.8.0: |
| 1040 |
---------------------- |
| 1041 |
|
| 1042 |
In short: |
| 1043 |
- new assertions |
| 1044 |
- new facilities to write custom assertions |
| 1045 |
- new macros to define test case in your fixture |
| 1046 |
- registration of test fixture in named suite |
| 1047 |
- xml & compiler format test result output |
| 1048 |
- a new graphic test runner for the QT library |
| 1049 |
- MFC test runner window is resizable |
| 1050 |
- cppunit as a DLL |
| 1051 |
- Unicode support for MFC test runner. |
| 1052 |
- architecture clean-up: TestResultCollector extracted from TestResult. |
| 1053 |
- architecture clean-up: TestFixture extracted from TestCase. |
| 1054 |
- cookbook and documentation updated. |
| 1055 |
|
| 1056 |
* New assertion (TestAssert.h): |
| 1057 |
|
| 1058 |
CPPUNIT_FAIL(message) : equivalent to CPPUNIT_ASSERT_MESSAGE( message, false ) |
| 1059 |
|
| 1060 |
CPPUNIT_ASSERT_EQUAL_MESSAGE( expectedValue, actualValue, additionalMessage ): |
| 1061 |
behave like CPPUNIT_ASSERT_EQUAL but allow to add some contextual information. |
| 1062 |
|
| 1063 |
* New macros to write test case (HelperMacros.h): |
| 1064 |
|
| 1065 |
CPPUNIT_TEST_EXCEPTION that expect an exception of a specified type to |
| 1066 |
be thrown. |
| 1067 |
|
| 1068 |
CPPUNIT_TEST_FAIL that expect a test to fail. |
| 1069 |
|
| 1070 |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION to register a suite in a named suite. See |
| 1071 |
cppunittest example for a demo. |
| 1072 |
|
| 1073 |
* TextTestRunner (TextTestRunner.h): |
| 1074 |
-run() returns a boolean indicating is the run was successful. |
| 1075 |
-the constructor and setOutputter() allow you do define a specific outputter |
| 1076 |
to print the test result (CompilerOutputter, TextOutputter, XmlOutputter...) |
| 1077 |
-result() provide access to the result of the test run. |
| 1078 |
-eventManager() give access to the TestResult, allowing you to register others |
| 1079 |
TestListener. |
| 1080 |
|
| 1081 |
* TestResult (TestResult.h): |
| 1082 |
- That class has been splitted in two: TestResult and TestResultCollector. |
| 1083 |
|
| 1084 |
- TestResult manages the TestListener (registration and event dispatch), as |
| 1085 |
well as the stop flag indicating if the current test run should be interrupted. |
| 1086 |
All other responsabilites have been moved to TestResultCollector. |
| 1087 |
|
| 1088 |
- TestResult no longer hold the result of the test run (this is done by |
| 1089 |
TestResultCollector which is a TestListener). |
| 1090 |
|
| 1091 |
* TestListener (TestListener.h): |
| 1092 |
- all failures and errors are reported using a single method: |
| 1093 |
virtual void addFailure( const TestFailure &failure ) |
| 1094 |
=> the failure object life time is limited to that of the method call. |
| 1095 |
Use TestFailure::isError() to distinguish error from failure. |
| 1096 |
Use TestFailure::clone() to obtain a duplicate of the failure. |
| 1097 |
|
| 1098 |
* New helpers to construct your own assertion (Asserter.h): |
| 1099 |
|
| 1100 |
It is now very easy to create your own assertion macro with failure |
| 1101 |
location. |
| 1102 |
|
| 1103 |
Asserter namespace contains functions used to construct and throw exception |
| 1104 |
to report failure. See Asserter documentation for an example of usage, and |
| 1105 |
examples/cppunittest/XmlUniformiser.h for a real life example. |
| 1106 |
|
| 1107 |
CPPUNIT_SOURCELINE() macro have been added (SourceLine.h). It captures the |
| 1108 |
failure location in a SourceLine object. Use it to write your own macros. |
| 1109 |
|
| 1110 |
Asserter namespace contains functions used to construct and throw exception |
| 1111 |
to report failure. See Asserter documentation for an example of usage, and |
| 1112 |
examples/cppunittest/XmlUniformiser.h for a real life example. |
| 1113 |
|
| 1114 |
* TestListener (TestListener.h): |
| 1115 |
|
| 1116 |
- TestSucesssListener : a simple listener that checks if a test has failed. |
| 1117 |
|
| 1118 |
- TestResultCollector : store all the test result. This class has been |
| 1119 |
extracted from the hold TestResult class. |
| 1120 |
|
| 1121 |
- TextTestProgressListener : print dot on cout to each time a test ends. |
| 1122 |
Letter 'F' and 'E' are printed when a failure or an error occurs. |
| 1123 |
|
| 1124 |
* Output (Outputter.h): |
| 1125 |
|
| 1126 |
- XML output: You can dump the TestResult as an XML document using |
| 1127 |
XmlOutputter. See examples/cppunittest/XmlOutputterTest.cpp for document |
| 1128 |
structure and usage. |
| 1129 |
|
| 1130 |
- Compiler compatible output : CompilerOutputter print the result in a |
| 1131 |
compiler compatible format. You can use your IDE to jump to the first |
| 1132 |
failure. See examples/cppunittest/CppUniTestMain.cpp for an example of usage. |
| 1133 |
|
| 1134 |
- Text output : replace the deprecated TextTestResult. Print the result in |
| 1135 |
a human readable format. |
| 1136 |
|
| 1137 |
* NotEqualException constructor take an additional message (usually used to |
| 1138 |
point out where the difference occured between the expected and actual value) |
| 1139 |
that can be retreived with additionalMessage(). See Asserter documentation for |
| 1140 |
an example of usage. |
| 1141 |
|
| 1142 |
* CppUnit |
| 1143 |
|
| 1144 |
- CppUnit can be compiled as a DLL (WIN32 platform). |
| 1145 |
DLL can be generated by the cppunit_dll.dsp project. You must define the |
| 1146 |
pre-processor symbol CPPUNIT_DLL when linking against CppUnit DLL. |
| 1147 |
See cppunittests examples for an example. |
| 1148 |
|
| 1149 |
* TestRunner |
| 1150 |
|
| 1151 |
- Qt TestRunner : a test runner for the Qt library (http://www.trolltech.com). |
| 1152 |
See examples/qt for an example of use. |
| 1153 |
|
| 1154 |
- MFC TestRunner : the dialog can now be resized. List view column sizes, |
| 1155 |
as well as the dialog size, are saved. Unicode configurations have been added. |
| 1156 |
|
| 1157 |
* Deprecated |
| 1158 |
|
| 1159 |
- TextTestResult : use the test listener TextTestProgressListener and the |
| 1160 |
ouputter TextOuputter instead. |
| 1161 |
|
| 1162 |
- Methods having fileName, lineNumber as parameter. Usually replaced by |
| 1163 |
a similar method that take a SourceLine parameter. Exception and |
| 1164 |
TestAssert are impacted. |
| 1165 |
|
| 1166 |
- TestRegistryFactory::registerFactory( const std::string &name, |
| 1167 |
TestFactory *factory ). |
| 1168 |
|
| 1169 |
You must define the symbol CPPUNIT_ENABLE_SOURCELINE_DEPRECATED to enable |
| 1170 |
old Exception constructor, UNKNOWNFILENAME and UNKNOWNLINENUMBER, as well |
| 1171 |
as function defined in the TestAssert namespace. The exception construction |
| 1172 |
and throwing as been moved to Asserter namespace. |
| 1173 |
|
| 1174 |
* Compatibility break: |
| 1175 |
|
| 1176 |
TestResult has been splitted in two class. TestResultCollector compatibility |
| 1177 |
breaks refer to the methods that were previously in TestResult. |
| 1178 |
|
| 1179 |
- TestListener::addError() was removed. addFailure() is used to report |
| 1180 |
any kind of failure. |
| 1181 |
- TestResultCollector::errors() was removed. Use failures() instead. |
| 1182 |
- TestResultCollector::failures() now reports all kind of failures. |
| 1183 |
- TestResultCollector::failures() returns a const reference. |
| 1184 |
- void TestListener::addFailure( TestFailure *failure ) was removed. |
| 1185 |
- void TestListener::addError( TestFailure *failure ) signature changed. |
| 1186 |
|
| 1187 |
- CPPUNIT_ASSERT_EQUAL_MESSAGE: changed arguments order. 'message' is now |
| 1188 |
the first argument instead of the last (like CPPUNIT_ASSERT_MESSAGE). |
| 1189 |
Notes that CPPUNIT_ASSERT_EQUAL was introduced in release 1.7.3. |
| 1190 |
|
| 1191 |
- directory for TestRunners as moved from cppunitui/ to cppunit/ui/ (concern |
| 1192 |
only users of release 1.7.10) |
| 1193 |
|
| 1194 |
* Bug fix: |
| 1195 |
- test ExceptionTest.testAssignment() don't fail anymore on VC++. See FAQ |
| 1196 |
for detail. |
| 1197 |
|
| 1198 |
|
| 1199 |
New in CppUnit 1.6.1 |
| 1200 |
-------------------- |
| 1201 |
|
| 1202 |
* This is a bug-fixing release. |
| 1203 |
|
| 1204 |
|
| 1205 |
New in CppUnit 1.6.0 |
| 1206 |
-------------------- |
| 1207 |
|
| 1208 |
* All CppUnit macros now begin with "CPPUNIT_". |
| 1209 |
|
| 1210 |
Macros CU_TEST_SUITE, CU_TEST, CU_TEST_SUITE_END, CU_TEST_SUB_SUITE, |
| 1211 |
and CU_TEST_SUITE_REGISTRATION are renamed but are otherwise unchanged; |
| 1212 |
they take the same arguments, and have the same effect. The old-style |
| 1213 |
macros can be used if your sources #define CPPUNIT_ENABLE_CU_TEST_MACROS |
| 1214 |
to 1 before including any CppUnit headers. |
| 1215 |
|
| 1216 |
Macros assert, assertEqual, and assertDoublesEqual, have been replaced |
| 1217 |
by CPPUNIT_ASSERT, CPPUNIT_ASSERT_EQUAL, and CPPUNIT_ASSERT_DOUBLES_EQUAL, |
| 1218 |
respectively. Macro assertLongsEqual is replaced by CPPUNIT_ASSERT_EQUAL. |
| 1219 |
The old assert macros can be used if your sources #define |
| 1220 |
CPPUNIT_ENABLE_NAKED_ASSERT to 1 before including any CppUnit headers. |
| 1221 |
|
| 1222 |
The old macro names are deprecated and will vanish in a future version |
| 1223 |
of CppUnit. |
| 1224 |
|
| 1225 |
|
| 1226 |
* Equality assertion CPPUNIT_ASSERT_EQUAL(expected,actual) can test |
| 1227 |
any type of expression. The types of "expected" and "actual" must |
| 1228 |
be the same; use a cast if necessary. |
| 1229 |
|
| 1230 |
|
| 1231 |
* Equality tested using CPPUNIT_ASSERT_EQUAL may be re-defined using |
| 1232 |
a traits class. Ditto for the string representation used in the |
| 1233 |
diagnostic messages. |
| 1234 |
|
| 1235 |
|
| 1236 |
* New assertion with arbitrary message: CPPUNIT_ASSERT_MESSAGE. |
| 1237 |
|
| 1238 |
|
| 1239 |
* A test case obtained using class TestCaller may check that |
| 1240 |
a particular exception is thrown. |
| 1241 |
|
| 1242 |
|
| 1243 |
* CppUnit has a test suite for itself! |
| 1244 |
|
| 1245 |
|
| 1246 |
* VC++ integration for MFC TestRunner. |
| 1247 |
|