This repository has been archived by the owner on Sep 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NEWS
1280 lines (869 loc) · 43.7 KB
/
NEWS
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
New in CppUnit 1.15.2:
---------------------
* Portability:
- Use more C++11 features and remove old and deprecated
C++ language features
- Fix a few compiler warnings
New in CppUnit 1.15.1:
---------------------
* Portability:
- Fix Wdefaulted-function-deleted warning with clang
- Remove old Visual Studio project files
New in CppUnit 1.15.0:
---------------------
- Report (un)signed character as intergers
- add CPPUNIT_TEST_FIXTURE()
- add message_to_string trait to allow custom string formatters
* Portability:
- Fix build with gcc 9
- Fix various compiler warnings
New in CppUnit 1.14.0:
---------------------
- TestCaller supports any callable that can be put into
std::function<void()>.
- CPPUNIT_TEST_PARAMETERIZED executes a test for any value in
an iteratable.
- Added new Assertion macros: ASSERT_LESS, ASSERT_GREATER,
ASSERT_LESSEQUAL, ASSERT_GREATEREQUAL
* Portability:
- Always build with C++11.
- Always require RTTI support.
- Removed support for compilers that don't support
default template arguments with standard containers.
- Removed portability headers for wrapper around
standard containers.
- Support C++11 enum class in asserter.
* Test Plug-in Runner:
- Fixed crash on Win64 in test runner (fdo#81433)
* Removed features
- QT test runner
- msvc6 test runners
- msvc6 plugin
- BeOS support
New in CppUnit 1.13.2:
---------------------
* Portability:
- Supports 64 bit build on windows
- Report errors from dlopen and dlclose through dlerror on
unix/linux.
New in CppUnit 1.13.1:
---------------------
* Portability:
- Use portable way to use free (fdo#52536)
- Prevent crash when demangling fails with gcc (fdo#52539)
New in CppUnit 1.13.0:
----------------------
* Portability:
- Added support for macro CPPUNIT_UNIQUE_COUNTER to config-*.h. It
should expands to a unique number per translation unit. Default
to __LINE__ if not defined. Use __COUNTER__ on MSVS 7.0+.
(Bug #2031696)
* Compilation
- destructor of Message causes segfault when testing (rhbz#641350)
- use correct CPPUNIT_VERSION value (sf#2983798)
- allow -Werror builds
(various Libreoffice patches)
- finite in "ieeefp.h" instead of math.h on Solaris (sf#2912590)
- Fixed compilation issue with Microsoft Visual Studio.Net 2005/2008 and
added Visual Studio 2005/2010 projects (.vcproj/.vcxproj)
- Changes to build without warnings using gcc -Wall -W -ansi
(patch #1898225 contributed by dpkatz)
- Libraries flags such as "-ldl" are now in LDADD instead of LIBADD_DL
( patch #2807259 contributed by Jan Echternach).
- Fixed detection of cxxabi.h with gcc 4.3 in configure (bug #2796543).
- made TestCaseDecorator copy c'tor and operator= private (fdo#51317)
* Documentation
- Updated several false documentation entries (sf#2185407, sf#2186611)
* Test Plug-in Runner:
- fixed memory leak in TestPlugInRunnerDlg (#1721408)
New in CppUnit 1.12.1:
----------------------
* Assertion:
- CPPUNIT_ASSERT_DOUBLES_EQUAL() now properly handles non-finite
values, specifically NaN, +Inf, and -Inf.
* Portability:
- Fixed some compilation issue for QtTestRunner.
- Code should build on Windows in UNICODE mode.
New in CppUnit 1.12.0:
----------------------
* Portability:
- autogen.sh can now be run on Mac OS X (patch #1449380
contributed by Sander Temme).
* MFC Test runner:
- fixed bug #1498175: double click on failure would sometime
not goto failed assertion in visual studio.
* Documentation:
- now generated with doxygen 1.4.7 new 'tabs' style.
New in CppUnit 1.11.4:
----------------------
* Portability:
- Support for Embedded Visual C++ 4 added. For this purpose, CppUnit now
provides a very simple stream implementation if none is provided.
This should also help porting on other platforms which have STL but
no stream support. Just make sure that CPPUNIT_NO_STREAM is defined
to 1 in your config header.
* Assertion:
- Added missing _MESSAGE variants for the following assertions:
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE
CPPUNIT_ASSERT_THROW_MESSAGE
CPPUNIT_ASSERT_NO_THROW_MESSAGE
CPPUNIT_ASSERT_ASSERTION_FAIL_MESSAGE
CPPUNIT_ASSERT_ASSERTION_PASS_MESSAGE
Notes: change made to CPPUNIT_ASSERT_THROW may cause compilation error
if you're expecting std::exception as it would be caught twice. Contact us
if it is an issue (we don't see much use for such a test).
Some assertions failure message are now more detailed (exception,
expression).
Thanks to Neil Ferguson who contributed this patch.
- Assertion on real number now output expected and actual value using the
maximum available precision instead of the previous strategy of rounding
to 6 digits.
Thanks to Neil Ferguson who contributed this patch.
* Outputter:
- XML Ouputter: patch #997006 contributed by Akos Maroy makes the
'stand-alone' attribute of the XML header optional.
See XmlOutputter::setStandalone() & XmlDocument::setStandalone().
- Better integration of compiler output for gcc on Mac OS X with Xcode
(contributed by Claus Broch).
* MFC Test Runner
- Integration with VC++ 7.0 & 7.1. Double clicking on a failure will now
to the failure location in the open IDE (no add-in necessary).
This was contributed by Max Quatember and Andreas Pfaffenbichler.
- Progress bar: now use system color to draw border
(patch from bug #1165875 contributed by Pieter Van Dyck).
* QT Test Runner
- Fixed display of multi-line messages (patch contributed by Karol Szkudlarek).
* Compilation:
- The standard pkg-config file is now generated on unix (contributed by
Robert Leight).
- MinGW: patch #1024428 contributed by astar, fixed compilation issue in
Win32DynamicLibraryManager.cpp.
- MinGW, cygwin: enable build of shared library when using libtool.
patch #1194394 contributed by Stéphane Fillod.
- autotool: applied patch #1076398 contributed by Henner Sudek. Quote:
"This patch allows AM_PATH_CPPUNIT to accept version
numbers without minor and micro version.
Now you can do:
AM_PATH_CPPUNIT(1.9)
instead of
AM_PATH_CPPUNIT(1.9.0)"
- Visual Studio 2005: removed deprecated warning.
* Documentation:
- Corrected many typos in cookbook and money example. Thanks to all
those who helped !
* Bug Fix:
- cppunit.m4: patch #946302, AM_PATH_CPPUNIT doesn't report result
if CppUnit is missing.
- Message/SourceLine: copy constructor have been specifically implemented
to ensure they are thread-safe even if std::string copy constructor
is not (usually on reference count based implementation).
- TestResultCollector: fixed memory leak occuring when calling reset().
* Contrib:
- added XSLT for compatibility with Ant junit xml formatter.
Patch #1112053 contributed by Norbert Barbosa.
See xml-xsl/cppunit2junit.xsl and cppunit2junit.txt for details.
- xml-xsl/report.xsl has been fixed to work with current xml output.
* (Possible) Compatiblity break:
- All text output is now done on cout() instead of sometime cerr &
sometime cout depending on the component.
- OStringStream definition has been removed from Portability.h. This
means that <sstream> is no longer included, and that ostringstream and
string might not be defined. In practice this should have no impact
since those includes have been moved to other CppUnit headers.
* Notes:
- CppUnit now uses the alias OStream when refering to std::ostream for
portability.
New in CppUnit 1.10.2:
----------------------
* Bug Fix:
- Memory checker: bug #938753, array bound read in
splitPathString() with substr if an empty string is passed.
- Memory leaks: bug #952912, many memory leaks removed in the
MFC test plug-in runner.
- Crash when using CPPUNIT_TEST_SUITE_REGISTRATION with cppunit dll.
Bug #921843. This bug was caused by a known STL bug in VC++ 6.
See http://www.dinkumware.com/vc_fixes.html <xtree> issue with shared
std::map in dll.
* Compilation:
- mingw & cigwin, bug #930338 & #945737 fixed.
- make install does not work on SunOS. Bug #940650 fixed.
- bug #933154, post-build step fails in directory with spaces
with Visual C++.
- DllPlugInTester, bug #941625 (char * string literal). Applied patch
contribued by Curt Arnold.
New in CppUnit 1.10.0 (same as 1.9.14):
--------------------------------------
* Assertions
- Ported exception assertion macros from cppunit 2 to the 1.9.x series:
CPPUNIT_ASSERT_THROW, CPPUNIT_ASSERT_NO_THROW,
CPPUNIT_ASSERT_ASSERTION_FAIL, CPPUNIT_ASSERT_ASSERTION_PASS.
* Deprecated:
- The helper macros: CPPUNIT_TEST_FAIL & CPPUNIT_TEST_EXCEPTION have
been deprecated. Use the new exception assertion macros instead.
* Bug Fix:
- cppunit-config: bug #903363, missing -ldl from the output of
cppunit-config --libs. Fixed thanks Eric Blossom patch.
- test plug-in(unix): Adding RTLD_GLOBAL allows test plug-ins
to provide symbols to shared objects they load themselves.
Thanks goes to Gareth Sylvester for this patch (#816563).
New in CppUnit 1.9.12:
---------------------
* Test Plug-in
- added support contributed support for UNIX systems that
have libdld and not libdl (e.g. hp-ux). Contributed by
Abdessattar Sassi.
* RTTI
- TypeInfoHelper now used gcc c++ abi to demangle typeinfo name thanks to
Neil Ferguson contribution.
* Bug Fix:
- MFC TestRunner: integrated bug fix from Tim Threlkeld for bug
#610191 and #610162. Fixed assertion when minizing dialog
(bug #643612).
- XMLOutputter: Fixed bug #676505: no space inserted between attributes
of XmlElement.
- CppUnit portability: fixed many mistakes relating to compilation
without type info or namespace reported by Philip Craig.
- Missing destructor with no throw specification for
DynamicLibraryManagerException. Bug #619059.
- Fixed missing export for operator <<(TextTestResult). Bug #610119.
- Missing include for typeinfo in TestNamer.h. Bug #662666.
* Compilation
- Fixed compilation issues for Borland C++ 6 and STLPort. Bug #694971,
#699794 and #662666.
- Fixed compilation issues for AIX.
- Fixed compilation issues for Visual C++ .NET 2002.
- Fixed doxygen usage in mingw environment (space not allowed in
doxygen path). Bug #700730.
- Fixed compilation issue for mingw (bug #711583).
New in CppUnit 1.9.10:
---------------------
- Major portability improvement
- Protector
- HelperMacros
- MFC TestRunner bug fixes
- Failure diagnostic
- Asserter
* Major portability improvement:
- Much work has been done to reduce C++ feature requirement to compile
CppUnit. It should now be possible to compile CppUnit 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.
See CodingGuideLines.txt for details.
* Protector
- Protector can be passed to the TestResult to 'protect' call to
setUp(), runTest() and tearDown() method. With this, it is easy to
capture exceptions which do not have std::exception as a base class,
such as CException or RWXMsg for example. TestResult and Protector
class documentation. Look at src/cppunit/DefaultProtector.cpp for
an example of implementation.
* Helper macros
- Mostly rewritten. It no longer use TestSuiteBuilder. A new object
TestSuiteBuilderContext was introduced. It is used to name test case,
create test fixture instance and add test to the fixture suite. It
is now much more easier to add custom test cases using
CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS. Should also prevent most
compability break concerning that macro.
- Useful typedef are now public: TestFixtureType, ParentTestFixtureType.
- New typedef for custom test method parameter:
typedef TestSuiteBuilderContext<TestFixtureType>
TestSuiteBuilderContextType;
- added support for abstract test fixture with
CPPUNIT_TEST_SUITE_END_ABSTRACT(). See documentation for further
detail.
* Failure diagnostic
- setUp() and tearDown() now provides a detailed diagnostic of the
failure (assertion, exception...)
- If RTTI is allowed to extract type info, CppUnit will report the
actual exception type in the diagnostic.
* Asserter:
- A new AdditionalMessage class has been introduced. It is used for
assertion that takes an additional 'message' argument
(CPPUNIT_ASSERT_MESSAGE...). Since this macro has an implicit
constructor that take a string, which creates a Message with the
specified string as detail. That way, additional message can be a
single string or a complex Message object. See documentation for
example of use.
* Bug Fix:
- MFC TestRunner: bug #530426 (conflict between TestRunner and host
application's resources). A huge thanks to Steven Mitter for that one.
- MFC TestRunner: Browse button is now disabled while running test.
* Deprecated
- CppUnit::TextUi::TestRunner moved to CppUnit::TextTestRunner.
- CppUnit::MfcUi::TestRunner moved to CppUnit::MfcTestRunner.
- CppUnit::QtUi::TestRunner moved to CppUnit::QtTestRunner.
* Compatiblity break:
- CppUnitTextUi::TestRunner, removed runTestByName() and runTest().
- TestSuiteBuilder: removed templatized method
addTestCallerForException(). See implementation of
CPPUNIT_TEST_EXCEPTION implementation for an alternative.
- TestAssert: removed deprecated functions (those not using SourceLine)
assertImplementation(), assertNotEqualImplementation(),
assertEquals(). Moved non deprecated functions assertEquals() and
assertEquals() into CppUnit namespace.
- Plug-ins 'Parameters' typedef has been replaced by class
PlugInParameters. The method commandLine() returns what used to be in
Parameters[0]. This should avoid future compatibility break when the
parameters passing API will be defined.
- TestPlugIn::initialize() now takes a PlugInParameters in argument
instead of a Parameters.
- template <class T> void assertEquals() no longer has a default message
value (no impact, unless you used this function directly instead of
assertion macros).
- HelperMacros: renamed CPPUNIT_TEST_ADD to
CPPUNIT_TEST_SUITE_ADD_TEST.
- HelperMacros: removed CPPUNIT_TEST_CUSTOM. Instead use
CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS and call context.addTest()
passing the test that was returned.
- HelperMacros: renamed CPPUNIT_TEST_CUSTOMS to
CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS. Changed method signature to
static void aMethodName( TestSuiteBuilderContextType &context ).
You can replace the 3 previous parameters by context. (See
documentation for further detail).
New in CppUnit 1.9.8:
---------------------
- New custom test macros for fixture suite
- Exception message are now structured
- Added detail field to MFC TestRunner
- New XmlDocument class to easily create new XML output format
- XmlOutputter customization
- Test plug-in XMLOutputter hook
- ClockerPlugIn example includes test time in XML output
- DllPlugInTester allows test plug-in to hook the XmlOutputter
- Configurable CompilerOutputter wrapping
* New custom test macros
- 3 new macros have been added for use when declaring test fixture suite:
- CPPUNIT_TEST_CUSTOM : to specify a method that returns an instance of
Test to add to the suite
- CPPUNIT_TEST_CUSTOM : to specify a method that add some tests to the
suite
- CPPUNIT_TEST_ADD : to add a test to the suite. Used this to create custom
CPPUNIT_TEST_xxx macros.
See macros documentation for examples and details.
* Exception message
- Exception message are now stored in a Message object instead of a string.
A message is composed of two items:
- a short description (~20/30 characters)
- a list of detail strings
The short description is used to indicate how the detail strings should be
interpreted. It usually indicates the failure types, such as
"assertion failed", "forced failure", "unexpected exception caught",
"equality assertion failed"... It should not contains new line characters
(\n).
Detail strings are used to provide more information about the failure. It
can contains the asserted expression, the expected and actual values in an
equality assertion, some addional messages... Detail strings can contains
new line characters (\n).
This change allow ouputters to deal with all failure the same way (there is
no special case for the equality assertion any more).
* New XmlDocument class to easily create new XML output format
- Classes XmlDocument and XmlElement where extracted from XmlOutputter. This
help writing outputters that use a completly different XML format.
- XmlDocument represents a XML file, and XmlElement represents a XML element.
* XmlOutputter customization
- Xml output can be customized using XmlOutputterHook. To do so, subclass
XmlOutputterHook and register it to the XmlOutputter with addHook() before
call XmlOutputter::write().
Hook can be used to add some datas to the XmlDocument or the XmlElement of
a specific hook. Methods have been added to XmlElement to help navigating
and modifying the XmlDocument.
See ClockerPlugIn example.
* MFC TestRunner
- The name of the test is displayed just before being run.
- Browse Test Hierarchy dialog is resizable.
- Better (and cleaner) handling of windows resizing
- Failure list now only show the short description of the failure.
- Edit field added to display the details of the selected failure.
* MFC test plug-in runner (TestPlugInRunner):
- command line: a dll name can be specified on the command after -testsuite:
example: TestPlugInRunnerd.exe -testsuite Simpled.dll
- Layout configuration is stored/restored.
* Test plug-in XML output Hook
- TestPlugIn interface provides a mean for plug-in to register hook for
XML output. Practically, this allow plug-in to add specific data to the
output. See ClockerPlugIn example, which add timing datas to the xml
output.
* DllPlugInTester:
- added option -w / --wait to wait for the user to press a key before exiting.
- plug-in can now provides XmlOutputterHook to add specific datas to the
XML ouput. See ClockerPlugIn example.
* CompilerOutputter wrapping is parametrized
- Wrap column can be set with setWrapColumn(). Default is now 79 instead of 80.
- Wrapping can be disabled with setNoWrap().
* Examples:
- ClockerPlugIn: the example now use the new XmlOutputterHook. Test time are
now included in the XML output. See examples/ClockerPlugIn/ReadMe.txt for
details.
* Bug Fix:
- CompilerOutputter: fixed wrapping issues (UT magic!)
- DllPlugInTester: use ISO-LATIN1 encoding if none is given. Flag --xsl was
ignored.
- MfcUi plug-in runner (TesTPlugInRunner): better handling of history when
loading and reloading a dll.
- Qt Test Runner: minor bug fixes. Should compile on Unix.
- XmlOutputter: use the default encoding if an empty string is given as
encoding
* Compatibility Break:
- CompilerOutputter: removed printNotEqualMessage() and printDefaultMessage().
No longer needed since Exception message are processed in a generic way.
Removed wrap(). Extracted to StringTools.
- Exception constructor takes a Message instead of a string. Notes that the
first argument in Message constructor is a short description, not the message.
Therefore, the change will usualy have the following form:
Exception( Message( "assertion failed", oldMessage ) );
You may want to use Asserter functions instead of constructing and throwing
the exception manually.
- TestPlugInAdapter: renamed TestPlugInDefaultImpl.
- TestSuiteBuilder: removed default constructor. All remaining constructors
take an additional argument of type TestNamer used to specify the fixture
named and generate test case name. Remove template method
addTestCallerForException(). Use addTest() instead (see
CPPUNIT_TEST_EXCEPTION implementation).
- TextTestResult: most printing method were removed. This task is now delegated
to TextOuputter.
- XmlElement: renamed addNode() to addElement().
- XmlOutputter: removed methods writeProlog() and writeTestResult() which
are replaced by XmlDocument. Renamed makeRootNode() to setRootNode(). It
no longer returns the root node, but set the root node of the XML document.
- XmlOuputter::Node: class has been extracted and renamed XmlElement.
* Deprecated:
- Asserter: all functions that use a string for the failure message. Construct
a Message instead (see Exception constructor compatiblity break and
Exception message feature).
New in CppUnit 1.9.6:
---------------------
- DllPlugInTester can be parametrized from command line
- Two test listener plug-in examples
- An 'hello world' example & getting started document : Money
- Contribution: generic makefile for Borland 5.5 free compiler.
- Bug fixes
* DllPlugInTester:
- Advanced command line to support miscellaneous listener outputer.
Parameters can now be passed to test plug-in:
-c --compiler
Use CompilerOutputter
-x --xml [filename]
Use XmlOutputter (if filename is omitted, then output to cout or
cerr.
-s --xsl stylesheet
XML style sheet for XML Outputter
-e --encoding encoding
XML file encoding (UTF8, shift_jis, ISO-8859-1...)
-b --brief-progress
Use BriefTestProgressListener (default is TextTestProgressListener)
-n --no-progress
Show no test progress (disable default TextTestProgressListener)
-t --text
Use TextOutputter
-o --cout
Ouputters output to cout instead of the default cerr.
filename[="options"]
Many filenames can be specified. They are the name of the
test plug-ins to load. Optional plug-ins parameters can be
specified after the filename by adding '='.
[:testpath]
Optional. Only one test path can be specified. It must
be prefixed with ':'. See TestPath constructor for syntax.
'parameters' (test plug-in or XML filename, test path...) may contains
spaces if double quoted. Quote may be escaped with \".
Some examples of command lines:
DllPlugInTesterd_dll.exe -b -x tests.xml -c simple_plugind.dll CppUnitTestPlugInd.dll
Will load 2 tests plug-ins (available in lib/), use the brief test
progress, output the result in XML in file tests.xml and also
output the result using the compiler outputter.
DllPlugInTesterd_dll.exe ClockerPlugInd.dll="flat" -n CppUnitTestPlugInd.dll
Will load the 2 test plug-ins, and pass the parameter string "flat"
to the Clocker plug-in, disable test progress. Clocker being a test
listener plug-ins (it doesn't implements any tests, it just register
a TestListener), this is equivalent to say 'run all the test
of CppUnitTestPlugIn and use ClockerPlugIn as a TestLisener'.
DllPlugInTesterd_dll.exe CppUnitTestPlugInd.dll :Core
Will run the test named "Core" (a suite in the present case ) of the
test plug-in.
* Documentation
- New getting started documentation. Not completed yet, but probably
a good complement to the current cookbook. Explore the creation
of the Money example.
* Examples
- Money (examples/Money): the 'hello world' example. Unit tests for
a simple Money class.
- DllPlugInTesterTest (src/DllPlugInTester/DllPlugInTester.dsp):
unit tests for CommandLineParser. Not really an example, but only
slightly more complex than Money.
- ClockerPlugIn (examples/ClockerPlugIn): a test listener plug-in
that track tests and test suites running time. Parameter: "flat"
for a reporting with a flattened tree.
- DumperPlugIn (examples/DumperPlugIn): a test listener plug-in that
dump the test tree as it run. Paramater: "flat" for a reporting
with a flattened tree.
- CppUnitTestPlugIn (examples/cppunitest/CppUnitTestPlugIn.dsp):
CppUnit's test suite as a test plug-in.
* Contribution
- Contributed by project cuppa team (http://sourceforge.jp/projects/cuppa/):
- Makefile for CppUnit with Borland C++ 5.5 free compiler: does not
depend on a specific CppUnit version.
* Compatiblity breaks
- DllPlugInTester: (1.9.4 only), should add -c to DllPlugInTester
command line.
* Bug Fix:
- DynamicLibaryManager did not report the library name when loading a
a library.
- BeosDynamicLibraryManager: fixed thanks to Shibu Yoshiki
('cuppa' project team).
- Broken build on Unix should be fixed for most (thanks to
Jeffrey Morgan).
New in CppUnit 1.9.4:
----------------------
- More versatile, easier to make test plug-in.
- A PlugInManager to manage multiple test plug-ins.
- Crossplatform test plug-in runner.
- Crossplatform test plug-in example.
- A brief progress listener
- Easier test hierarchy creation
- Improved documentation.
- Tracking of test run start/end.
- Contribution: XML style sheet & borland 5.5 makefile.
- Help needed on the Unix side!
* Buildling on Unix:
- I did not get any feed back on the previous build issue on Unix. Using
a simple autobook example was useless to try to solve the problem. Here
is the issue:
CppUnit library build fine, it is the example I'm having trouble with.
Since the test plug-in have been added, CppUnit use the function
dlopen(), dlsym() and dlclose() on unix to load/unload the plug-in.
Those functions apparently requires to link another library when
building an exectuable. Here is was should be done:
- linking against the said library for each example.
- generates the shared library for the examples/simple/simple_plugin
example (source files are ExampleTestCase.cpp, ExampleTestCase.cpp
and SimplePlugIn.cpp).
- if possible, makes the above optionnal if --disable-test-plug-in
is defined:
- don't link the dlXXX library
- don't compile the plug-in example
- add #define CPPUNIT_NO_TESTPLUGIN 1 to the config file
Contact me on the mailing-list for more details.
* TestPlugIn:
- A simple fact I realised while testing: if you link your test plug-in
against the DLL version of cppunit (or shared library on Unix), then
test registered to the TestFactoryRegistry (it is what's hide behind
CPPUNIT_TEST_SUITE_REGISTRATION) are automatically shared. Changes
have been made to support that usage (CppUnit was crashing badly).
Using the TestFactoryRegistry provides much more flexiblity that
providing a single suite for the plug-in. As such:
- CppUnit plug-in should be linked against the dll version of CppUnit library.
- Plug-in should register their tests using the CPPUNIT_TEST_SUITE_xxx macros.
- 'homemade' suite can still be registred to the TestFactoryRegistry that is
passed as parameter on plug-in initialization. Notes that you must
unregister those suites during plug-in uninitialization, otherwise on
destruction, the TestFactoryRegistry will attempt to destroy them... Your
plug-in would have been already unloaded...
- Plug-in can accept parameters on initialization (notes that the Parameters
object is far from being stabilized, but whatever form it takes, it will be
a list of string).
- Plug-in can register their one listener for a test run. This means that you
can extends 'DllPlugInTester' by creating test plug-in... This also means
than you can listen to startTestRun()/endTestRun() to do some global
setUp/tearDown (to initialize globales resources, such as COM...)
- Why all this fuss around test plug-in ? Test plug-in are the incarnation of
an old concept: testable components...
* PlugInManager:
- The PlugInManager is used to load/unload plug-ins. It takes care of all
the 'plug-in' protocol and makes it easy to use multiple plug-ins at the
same time. It dispatches the addListener()/removeListener() message to
each plug-in.
* Crossplatform test plug-in runner (src/DllPlugInRunner):
- This application can be used to run your test plug-ins. It can load
multiple test plug-ins and run all or a specific test in the test
hierarchy returned by TestFactoryRegistry::getRegistry().makeTest().
- Plug-in loaded by the plug-in may also be custom TestListener.
- It can be use for post-build check and to debug the plug-in.
- Why use it? It keep you away from CppUnit API changes!
* Easier test hierarchy creation (TestFactoryRegistry/HelperMacros):
- added method addRegistry(name) to add a named registry to the registry.
see TestFactoryRegistry for an example of use.
- added macros CPPUNIT_REGISTRY_ADD( which, to ) and
CPPUNIT_REGISTRY_ADD_TO_DEFAULT( which ) to create test hierarchy at static
initialization (in the spirit of CPPUNIT_TEST_SUITE_xxx() macros).
* VerboseTestProgressListener:
- A new TestListener that prints the test name before running it. Most useful when
a test crashing, mean a application crash.
* Documentation:
- More details about the test plug-in, how to use it, how does it works...
See module/Writing Test Plug-in.
* Examples:
- examAdded crossplatform simple example. Equivalent to VC++ HostApp example.
- examples/simple: a very simple example, demonstrating the use of CppUnit
with a single TestFixture. Demonstrate both how to build an application
using TestRunner, and how to build a test plug-in to use with the
test plug-in runner.
* Contribution
- Contributed by project cuppa team (http://sourceforge.jp/projects/cuppa/):
- XML style sheet: transform CppUnit XML output into HTML.
- Makefile for CppUnit with Borland C++ 5.5 free compiler.
* Behavior changes:
- Test runner should call TestResult::runTest() to run the 'top level' test. This
will inform the TestListener of the test run start/end.
* Compatiblity break:
- TestFactoryRegistry don't own register test anymore. AutoRegisterSuite has
been updated to preverse its apparent behavior. It should be of concern
if you created and registered custom TestFactory.
- Removed TextTestProgressListener::done(). No longer needed, it listens
for endTestRun().
* Compatiblity Break for 1.9.2 users:
- TestPlugIn.h: CppUnitTestPlugIn as been completly rewritten.
- TestPlugIn.h: macro CPPUNIT_PLUGIN_IMPLEMENT() don't take any arguments.
- TestSuitePlugIn: removed. A similar functionnality is provided by
PlugInManager.
- TestPlugInDefaultImpl: renamed TestPlugInAdapter. It does not implements
any default behavior anymore.
- DllPlugInRunner: no longer support multiple specific tests. The test path must
be prefixed with ':'. Release and Debug configuration links against cppunit_dll.
* Bug Fix:
- Crash when linking CppUnit DLL within another DLL that registered test. Caused
by the destruction of tests registered to TestFactoryRegistry. Fixed by
providing a register/unregister interface and removing the ownership of
TestFactory to TestFactoryRegistry.
New in CppUnit 1.9.2:
----------------------
In short:
- Cleaner XML output
- Crossplatform Test plug-in
- TestPlugInSuite to wrap test plug-in
- More TestPlugIn documentation.
* TestPlugIn:
- The test plug-in functionnality has been rewritten from scrash.
TestPlugIn related macro are now crossplatform (exporting the plug-in
function from the dynamic library...).
- Class DynamicLibraryManager provides a generic way to access dynamic
library. Platform specific implementation provided for WIN32, unix, BeOs.
Can be very easily ported to new platform.
- A More flexible and hopefully extensible interface has been introduced
(CppUnitPlugIn).
- A default implementation using the test factory registry is provided
(TestPlugInDefaultImpl). Can be easily customized.
- The one line test plug-in declaration was renamed CPPUNIT_PLUGIN_IMPLEMENT.
See modules/Writing Test Plug-in documentation and examples/EasyTestPlugIn.
* XmlOutputter:
- XML output is now indented. Nodes that don't have children are one line
tag. The output can now easily be read.
* Compatibility break:
- class TestSucessListener was renamed to TestSuccessListener.
- XmlOutput: renamed tag <SuccessfulTests> to <SuccessfulTests>
- Global fix of the 'success' typo (was misspelled 'sucess'). Main impacts are listed
above, but check your own code in case you override some protected/private methods.
- TestPlugInInterface (include/msvc6/TestPlugInInterface.h): this header and class
are now obsolete. You should use include/cppunit/plugin/TestPlugIn.h instead.
Macro CPPUNIT_TESTPLUGIN_IMPL have been replaced by CPPUNIT_PLUGIN_IMPLEMENT.
- TestDecorator inherits Test instead of TestLeaf.
- DllPlugInTester only run DLL implementing the new new TestPlugIn interface.
New in CppUnit 1.9.0:
----------------------
In short:
- Exploration of the test hierarchy without RTTI support
- Utility methods to find a test in the hierarchy
- TestPath to store/load the path to a specific test in the hierarchy
- Generic TestRunner
- Style sheet support added to XML ouput.
- CompilerOutputter supports run-time parametrization of error location format.
- Tracking of test suite run.
- Debugging and post-build testing of DLL using DllPlugInTester.
- Easy creation a test plug-in and test plug-in new example
* Test:
- Exploration of the test hierarchy without RTTI support:
Added Test::getChildTestCount() and Test::getChildTestAt() to walk the test hierarchy
without RTTI.
- Utility methods to find a test in the hierarchy:
Added Test::findTest(), Test::findTestPath() and Test::resolveTestPath().
* TestPath:
- A new class that store the path to a specific test (list of pointer). Can be
converted into a string and constructed from a string. Typically used with
TestRunner.