Merge lp:~blep/cppunit2/testcase-factory into lp:cppunit2/trunk

Proposed by blep
Status: Merged
Merged at revision: not available
Proposed branch: lp:~blep/cppunit2/testcase-factory
Merge into: lp:cppunit2/trunk
Diff against target: None lines
To merge this branch: bzr merge lp:~blep/cppunit2/testcase-factory
Reviewer Review Type Date Requested Status
blep Approve
Review via email: mp+4471@code.launchpad.net
To post a comment you must log in.
Revision history for this message
blep (blep) wrote :

The registry now contains test case factory instead of test case instance. This will allow multiple instances creation for thread safety and makes it easier to have parametrized test.

The suite registry has been revised to match common use case, such as having a common top level suite for all test cases of a library.

lp:~blep/cppunit2/testcase-factory updated
426. By Baptiste Lepilleur <email address hidden>

Fixed some compilation issues on Linux/gcc 4.4.

427. By blep <blep@unknown>

Fixed compilation issues with Solaris SunStudio 12.

Revision history for this message
blep (blep) wrote :

Compilation and test pass on Solaris/Sun Studio 12, as well as MSVS 6, 7.1, 8.0, and 9.0. No new compilation issues are introduced on Linux/gcc 4.4 (but stringize tests still do not compile).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2008-12-14 14:18:05 +0000
3+++ .bzrignore 2008-12-25 17:01:58 +0000
4@@ -1,10 +1,14 @@
5 bin
6+build
7 buildscons
8 libs
9 scons.py
10-scons-local-*
11+cppunit2/scons-local-*
12+cppunit2/scons-LICENSE
13+*.user
14 *.ncb
15+*.suo
16 cppunit2/test/json_test/*.actual*
17 cppunit2/test/json_test/*.rewrite
18 cppunit2/test/json_test/*.process-output
19-build
20+makefiles/vs71/cppunit2.suo
21
22=== modified file 'cppunit2/TODO'
23--- cppunit2/TODO 2008-07-13 06:19:20 +0000
24+++ cppunit2/TODO 2009-03-13 21:39:36 +0000
25@@ -1,5 +1,4 @@
26 * complete works on the CommandLines library => likely moved to opentest.
27-* add support for ExtendedData in C function test case (CPPUT_TEST_FUNCTION...)
28 * need a new Any supporting feature required for unit testing:
29 - toString (toJson?)
30 - type to text (for conversion error message)
31@@ -9,8 +8,5 @@
32 - support for unknown aggregate types.
33 - conversion between type (int, uint, const char *, std::string...)
34 - type comparison
35-* arange for fixture based test case to create a new instance for each test run.
36- => solve requirement to implement setUp()/tearDown()
37- => ensure thread-safety when the same test is executed in multiple thread at the
38- same time (stress test)
39+* write unit test for light test fixture
40
41
42=== modified file 'cppunit2/doc/coding_guidelines.dox'
43--- cppunit2/doc/coding_guidelines.dox 2007-08-14 15:42:14 +0000
44+++ cppunit2/doc/coding_guidelines.dox 2008-12-11 20:28:30 +0000
45@@ -17,7 +17,7 @@
46
47 <table>
48 <tr><td><b>First letter in upper case</b></td><td><b>First letter in lower case</b></td></tr>
49-<tr><td><tt>TestCase</tt></td><td><tt>testCase</tt></td></tr>
50+<tr><td><tt>TestMeta</tt></td><td><tt>testCase</tt></td></tr>
51 <tr><td><tt>DLLLoader</tt></td><td><tt>dllLoader</tt></td></tr>
52 </table>
53
54@@ -40,9 +40,9 @@
55 resource.c // OK
56
57 test_case.c // BAD
58-TestCase.c // BAD
59-TestCase.h // BAD
60-TestCase.C // BAD
61+TestMeta.c // BAD
62+TestMeta.h // BAD
63+TestMeta.C // BAD
64 \endcode
65
66 \subsection cg_cppidentifiers C++ identifiers
67@@ -94,7 +94,7 @@
68 Example:
69 \code
70 Test
71-TestCase
72+TestMeta
73 ExceptionGuard
74 \endcode
75
76@@ -217,11 +217,11 @@
77 - return type in function definitions should be
78 \code
79 // An example of constructor
80-TestCase::TestCase( const CppTL::Functor0 &setUp,
81+TestMeta::TestMeta( const CppTL::Functor0 &setUp,
82 const CppTL::Functor0 &run,
83 const CppTL::Functor0 &tearDown,
84 const std::string &name )
85- : AbstractTestCase( name )
86+ : TestCase( name )
87 , setUp_( setUp )
88 , run_( run )
89 , tearDown_( tearDown )
90
91=== modified file 'cppunit2/doc/cpput.dox'
92--- cppunit2/doc/cpput.dox 2007-08-16 13:51:04 +0000
93+++ cppunit2/doc/cpput.dox 2008-12-20 10:45:17 +0000
94@@ -43,8 +43,8 @@
95 \section section_writing_test Writing tests
96
97 \subsection section_instantiating_test Instantiating tests
98- A test case is exposed by instantiating a subclass of CppUT::AbstractTestCase. Each
99-time a test case is executed, the \link CppUT::AbstractTestCase::runTest() runTest()\endlink
100+ A test case is exposed by instantiating a subclass of CppUT::TestCase. Each
101+time a test case is executed, the \link CppUT::TestCase::runTest() runTest()\endlink
102 method is called. This method calls the virtual methods \testCaseSetup, \testCaseRun
103 and \testCaseTearDown.
104 The \testCaseRun and \testCaseTearDown methods are only called if
105@@ -57,15 +57,15 @@
106 automatically (see \ref section_skippingtest for detail).
107
108 There is mainly two ways to create test case:
109- - Subclassing CppUT::AbstractTestCase and overridding at least \testCaseRun.
110- - Instantiating CppUT::TestCase, which subclass CppUT::AbstractTestCase, and
111+ - Subclassing CppUT::TestCase and overridding at least \testCaseRun.
112+ - Instantiating CppUT::TestMeta, which subclass CppUT::TestCase, and
113 passing the function to execute in the constructor.
114
115 A test case is usually created using CppUT::makeTestCase() that instantiate
116-CppUT::TestCase.
117+CppUT::TestMeta.
118
119 Notes that test case instantiation is usually only done when you need to create your own
120-convenience test case macro or you are populating a TestSuite with parametrized TestCase.
121+convenience test case macro or you are populating a Suite with parametrized TestMeta.
122 The framework provides severable way to create and register test case, see \ref section_lightfixture,
123 \ref section_testfixture, \ref section_testfunction.
124
125@@ -219,7 +219,7 @@
126 Notes that a SkipTestException exception (a subclass of std::runtime_error) is thrown
127 to abort the test.
128
129-\subsection section_testfixture Creating TestCase: TestFixture
130+\subsection section_testfixture Creating TestMeta: TestFixture
131
132 A TestFixture is a class that implements multiple test cases sharing the same setUp/tearDown steps.
133 Test cases are implements as "void test()" member function and each test case has its own instance
134@@ -230,11 +230,11 @@
135 - polymorphism: you can subclass a TestFixture and adds more test or override setUp/teardown
136 virtual member functions.
137 - TestExtendedData can be specified for each test
138-- TestFixture test cases are grouped within a TestSuite
139+- TestFixture test cases are grouped within a Suite
140 - macro usage is limited to a declaration of the test member function and is clearly separated
141 from code.
142
143-\subsection section_lightfixture Creating TestCase: light Fixture
144+\subsection section_lightfixture Creating TestMeta: light Fixture
145
146 A Light test fixture is similar to a TestFixture but does not support the following features:
147 - templated test class
148@@ -243,18 +243,18 @@
149
150 On the positive side, it is easier on the wrist.
151
152-\subsection section_testfunction Creating TestCase: test functions
153+\subsection section_testfunction Creating TestMeta: test functions
154
155 A test case can be implemented as a plain C function "void test()".
156
157-\subsection section_tablefixture Creating TestCase: using table fixture in test cases
158+\subsection section_tablefixture Creating TestMeta: using table fixture in test cases
159
160 Sometimes when writing test cases, you need to repeat the same test with different
161 input values. Table fixture are a way to do this.
162
163 \see CPPUT_TEST_TABLE(), CPPUT_REGISTER_TEST_FUNCTION_TABLE_IN(), CPPUT_TEST_FUNCTION_TABLE_IN().
164
165-\subsection section_inputfixture Creating TestCase: input fixture
166+\subsection section_inputfixture Creating TestMeta: input fixture
167
168 Input fixture are intended to run functional test cases with externalized input data.
169
170
171=== modified file 'cppunit2/doc/doxyfile.in'
172--- cppunit2/doc/doxyfile.in 2007-03-16 21:41:39 +0000
173+++ cppunit2/doc/doxyfile.in 2008-12-11 20:28:30 +0000
174@@ -26,9 +26,9 @@
175 JAVADOC_AUTOBRIEF = YES
176 INHERIT_DOCS = YES
177 TAB_SIZE = 3
178-ALIASES = "testCaseSetup=\link CppUT::AbstractTestCase::setUp() setUp()\endlink" \
179- "testCaseRun=\link CppUT::AbstractTestCase::run() run()\endlink" \
180- "testCaseTearDown=\link CppUT::AbstractTestCase::tearDown() tearDown()\endlink" \
181+ALIASES = "testCaseSetup=\link CppUT::TestCase::setUp() setUp()\endlink" \
182+ "testCaseRun=\link CppUT::TestCase::run() run()\endlink" \
183+ "testCaseTearDown=\link CppUT::TestCase::tearDown() tearDown()\endlink" \
184 "json_ref=<a HREF='http://www.json.org/'>JSON (JavaScript Object Notation)</a>"
185
186 OPTIMIZE_OUTPUT_FOR_C = NO
187
188=== modified file 'cppunit2/examples/checking_assertions/main.cpp'
189--- cppunit2/examples/checking_assertions/main.cpp 2005-11-07 21:43:08 +0000
190+++ cppunit2/examples/checking_assertions/main.cpp 2009-03-13 20:59:56 +0000
191@@ -1,10 +1,9 @@
192 #include <examples/common/examplecommon.h>
193-#include <cpput/testcase.h>
194
195
196 // Checking assertion do not abort the test uppon failure:
197 // all the failing assertions below will be reported by the test framework
198-static void testBasicCheckingAssertion()
199+CPPUT_TEST_FUNCTION( testBasicCheckingAssertion )
200 {
201 CPPUT_CHECK( 1 == 2, "1 is not equal to 2..." );
202 CPPUT_CHECK_EXPR( 1 + 2 == 4 );
203@@ -18,8 +17,5 @@
204
205 int main( int argc, const char *argv[] )
206 {
207- CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" );
208- allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testBasicCheckingAssertion ),
209- "testBasicCheckingAssertion" ) );
210- return runExampleTests( argc, argv, allSuite.get() );
211+ return runExampleTests( argc, argv );
212 }
213
214=== modified file 'cppunit2/examples/common/examplecommon.h'
215--- cppunit2/examples/common/examplecommon.h 2005-11-13 09:17:57 +0000
216+++ cppunit2/examples/common/examplecommon.h 2009-03-13 20:59:56 +0000
217@@ -1,22 +1,17 @@
218 #ifndef CPPUT_EXAMPLES_EXAMPLECOMMON_H_INCLUDED
219 # define CPPUT_EXAMPLES_EXAMPLECOMMON_H_INCLUDED
220
221-#include <cpput/testsuite.h>
222+#include <cpput/registry.h>
223 #include <cpput/lighttestrunner.h>
224-//#include <cpput/testrunner.h> // cppunit2 testrunner for opentest
225 #include <cpput/assertcommon.h>
226+#include <cpput/testfunction.h>
227
228 inline int runExampleTests( int argc,
229- const char *argv[],
230- CppUT::Test *test )
231+ const char *argv[] )
232 {
233-// CppUT::TestRunner runner;
234-// runner.setRootSuite( allSuite.get() );
235-// OpenTest::TextTestDriver driver( runner );
236-// bool sucessful = driver.run();
237 CppUT::LightTestRunner runner;
238- runner.addTest( test );
239- bool sucessful = runner.runAllTests();
240+ runner.addSuite( CppUT::Registry::getRootSuite() );
241+ bool sucessful = runner.runTests();
242 return sucessful ? 0 : 1;
243 }
244
245
246=== modified file 'cppunit2/examples/ignore_failure_demo/main.cpp'
247--- cppunit2/examples/ignore_failure_demo/main.cpp 2005-11-11 19:54:15 +0000
248+++ cppunit2/examples/ignore_failure_demo/main.cpp 2009-03-13 20:59:56 +0000
249@@ -1,12 +1,11 @@
250 #include <examples/common/examplecommon.h>
251-#include <cpput/testcase.h>
252
253 static int half( int x )
254 {
255 return (x+1) / 2;
256 }
257
258-static void testIgnoreFailure()
259+CPPUT_TEST_FUNCTION( testIgnoreFailure )
260 {
261 CPPUT_CHECK_EQUAL( 1, half(2) );
262 CPPUT_IGNORE_FAILURE(( CPPUT_CHECK_EQUAL( 2, half(5) ) ));
263@@ -17,8 +16,5 @@
264
265 int main( int argc, const char *argv[] )
266 {
267- CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" );
268- allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testIgnoreFailure ),
269- "testIgnoreFailure" ) );
270- return runExampleTests( argc, argv, allSuite.get() );
271+ return runExampleTests( argc, argv );
272 }
273
274=== modified file 'cppunit2/examples/input_test/main.cpp'
275--- cppunit2/examples/input_test/main.cpp 2007-08-16 13:51:04 +0000
276+++ cppunit2/examples/input_test/main.cpp 2009-03-13 20:59:56 +0000
277@@ -1,6 +1,7 @@
278 #include <examples/common/examplecommon.h>
279 #include <cpput/testcase.h>
280 #include <cpput/testinfo.h>
281+#include <cpput/testfunction.h>
282 #include <cpput/assertcommon.h>
283 #include <cpput/inputbasedtest.h>
284 #include <json/reader.h>
285@@ -38,7 +39,7 @@
286
287
288
289-static void testOperations()
290+CPPUT_TEST_FUNCTION( testOperations )
291 {
292 Json::Reader reader;
293 Json::Value data;
294@@ -60,11 +61,5 @@
295
296 int main( int argc, const char *argv[] )
297 {
298- CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" );
299-
300- CppUT::TestPtr test1 = CppUT::makeTestCase( CppTL::cfn0( testOperations ),
301- "testOperations" );
302- allSuite->add( test1 );
303-
304- return runExampleTests( argc, argv, allSuite.get() );
305+ return runExampleTests( argc, argv );
306 }
307
308=== modified file 'cppunit2/examples/light_fixture/main.cpp'
309--- cppunit2/examples/light_fixture/main.cpp 2007-08-15 15:35:40 +0000
310+++ cppunit2/examples/light_fixture/main.cpp 2009-03-13 20:59:56 +0000
311@@ -25,7 +25,7 @@
312 int y_;
313 };
314
315-struct LineTest
316+struct LineTest : CppUT::TestCase
317 {
318 LineTest()
319 : p1_( 1, 0 )
320@@ -37,24 +37,21 @@
321 };
322
323 // In the light fixture test you can directly access fixture members
324-CPPUT_TEST_LIGHT_FIXTURE( LineTest, testSquaredLength )
325+CPPUT_FIXTURE_TEST( LineTest, testSquaredLength )
326 {
327 CPPUT_CHECK_EQUAL( 1, p1_.squaredLength() );
328 CPPUT_CHECK_EQUAL( 2*2, p2_.squaredLength() );
329 }
330
331-CPPUT_TEST_LIGHT_FIXTURE_WITH_SPECIFICS( LineTest, testAdd, timeOut(0.2) )
332+
333+CPPUT_FIXTURE_TEST_WITH_META( LineTest, testAdd, timeOut(0.2) )
334 {
335 p1_.add( p2_ );
336 CPPUT_CHECK_EQUAL( 1+2*2, p1_.squaredLength() );
337 }
338
339-// Register the light fixture test suite to the default test suite.
340-CPPUT_REGISTER_LIGHT_FIXTURE( LineTest );
341-
342
343 int main( int argc, const char *argv[] )
344 {
345- CppUT::TestSuitePtr allSuite = CppUT::Registry::instance().createDefaultTests();
346- return runExampleTests( argc, argv, allSuite.get() );
347+ return runExampleTests( argc, argv );
348 }
349
350=== modified file 'cppunit2/examples/log_demo/main.cpp'
351--- cppunit2/examples/log_demo/main.cpp 2005-11-08 19:25:50 +0000
352+++ cppunit2/examples/log_demo/main.cpp 2009-03-13 20:59:56 +0000
353@@ -1,9 +1,8 @@
354 #include <examples/common/examplecommon.h>
355-#include <cpput/testcase.h>
356 #include <cpptl/stringtools.h>
357
358
359-static void testLogDemo()
360+CPPUT_TEST_FUNCTION( testLogDemo )
361 {
362 for ( int index =0; index < 5; ++index )
363 {
364@@ -16,8 +15,5 @@
365
366 int main( int argc, const char *argv[] )
367 {
368- CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" );
369- allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testLogDemo ),
370- "testLogDemo" ) );
371- return runExampleTests( argc, argv, allSuite.get() );
372+ return runExampleTests( argc, argv );
373 }
374
375=== modified file 'cppunit2/examples/parametrized_test/main.cpp'
376--- cppunit2/examples/parametrized_test/main.cpp 2005-11-13 09:17:57 +0000
377+++ cppunit2/examples/parametrized_test/main.cpp 2009-03-13 20:59:56 +0000
378@@ -12,11 +12,11 @@
379
380 int main( int argc, const char *argv[] )
381 {
382- CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" );
383- allSuite->add( CppUT::makeTestCase( CppTL::bind_cfn( testMultiply, 7, 2, 7*2 ),
384+ CppUT::Suite &rootSuite = CppUT::Registry::getRootSuite();
385+ rootSuite.add( CppUT::makeTestCase( CppTL::bind_cfn( testMultiply, 7, 2, 7*2 ),
386 "multiply 7*2" ) );
387- allSuite->add( CppUT::makeTestCase( CppTL::bind_cfn( testMultiply, 7, 5, 7*4 ),
388+ rootSuite.add( CppUT::makeTestCase( CppTL::bind_cfn( testMultiply, 7, 5, 7*4 ),
389 "multiply 7*5 (failing demo)" ) );
390
391- return runExampleTests( argc, argv, allSuite.get() );
392+ return runExampleTests( argc, argv );
393 }
394
395=== modified file 'cppunit2/examples/stringize_demo/main.cpp'
396--- cppunit2/examples/stringize_demo/main.cpp 2005-11-08 19:25:50 +0000
397+++ cppunit2/examples/stringize_demo/main.cpp 2009-03-13 20:59:56 +0000
398@@ -1,5 +1,4 @@
399 #include <examples/common/examplecommon.h>
400-#include <cpput/testcase.h>
401 #include <cpptl/stringtools.h>
402 #include <cpput/assertenum.h>
403 #include <deque>
404@@ -33,7 +32,7 @@
405 }
406
407
408-static void testStringize()
409+CPPUT_TEST_FUNCTION( testStringize )
410 {
411 CPPUT_CHECK_EQUAL( ExampleNamespace::WeirdType(5678), ExampleNamespace::WeirdType(1234) );
412
413@@ -47,8 +46,5 @@
414
415 int main( int argc, const char *argv[] )
416 {
417- CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" );
418- allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testStringize ),
419- "testStringize" ) );
420- return runExampleTests( argc, argv, allSuite.get() );
421+ return runExampleTests( argc, argv );
422 }
423
424=== modified file 'cppunit2/examples/test_function/main.cpp'
425--- cppunit2/examples/test_function/main.cpp 2007-08-15 15:35:40 +0000
426+++ cppunit2/examples/test_function/main.cpp 2009-03-13 20:59:56 +0000
427@@ -1,40 +1,38 @@
428 #include <examples/common/examplecommon.h>
429 #include <cpput/testfunction.h>
430
431-static void test1()
432+// Register function test1 in the default test suite
433+
434+CPPUT_TEST_FUNCTION( test1 )
435 {
436 CPPUT_CHECK( 1 == 2, "1 is not equal to 2..." );
437 CPPUT_CHECK_EXPR( 1 + 2 == 4 );
438 }
439
440-// Register function test1 in the default test suite
441-CPPUT_REGISTER_TEST_FUNCTION( test1 );
442-
443
444 // Register function test1 in the test suite named "MyTestSuite"
445-CPPUT_REGISTER_TEST_FUNCTION_IN( test1, "MyTestSuite" );
446-
447-
448-// Declare and register a function test2 in the default test suite
449-CPPUT_TEST_FUNCTION( test2 )
450-{
451- CPPUT_CHECK_FALSE( 1 == 1, "1 is equal to 1..." );
452- CPPUT_CHECK_EXPR_FALSE( 1 + 1 == 2 );
453-}
454-
455-
456-// Declare and register a function test2 in the test suite named "MyTestSuite"
457-CPPUT_TEST_FUNCTION_IN( test3, "MyTestSuite" )
458-{
459- CPPUT_CHECK_EQUAL( 1, 2 );
460- CPPUT_CHECK_NOT_EQUAL( 34, 34 );
461-}
462-
463-// Makes MyTestSuite a child of default.
464-CPPUT_REGISTER_SUITE_RELATIONSHIP_TO_DEFAULT( "MyTestSuite" );
465+CPPUT_SUITE( "MyTestSuite" )
466+{
467+
468+ // Declare and register a function test2 in the default test suite
469+ CPPUT_TEST_FUNCTION( test2 )
470+ {
471+ CPPUT_CHECK_FALSE( 1 == 1, "1 is equal to 1..." );
472+ CPPUT_CHECK_EXPR_FALSE( 1 + 1 == 2 );
473+ }
474+
475+
476+ // Declare and register a function test2 in the test suite named "MyTestSuite"
477+ CPPUT_TEST_FUNCTION( test3 )
478+ {
479+ CPPUT_CHECK_EQUAL( 1, 2 );
480+ CPPUT_CHECK_NOT_EQUAL( 34, 34 );
481+ }
482+
483+}
484+
485
486 int main( int argc, const char *argv[] )
487 {
488- CppUT::TestSuitePtr allSuite = CppUT::Registry::instance().createDefaultTests();
489- return runExampleTests( argc, argv, allSuite.get() );
490+ return runExampleTests( argc, argv );
491 }
492
493=== modified file 'cppunit2/include/cpptl/config.h'
494--- cppunit2/include/cpptl/config.h 2007-08-15 09:20:57 +0000
495+++ cppunit2/include/cpptl/config.h 2009-03-12 21:42:38 +0000
496@@ -274,7 +274,7 @@
497
498 template<class T>
499 inline void
500- swap( T &left, T &right )
501+ trivialSwap( T &left, T &right )
502 {
503 T temp( left );
504 left = right;
505
506=== modified file 'cppunit2/include/cpptl/conststring.h'
507--- cppunit2/include/cpptl/conststring.h 2005-11-08 20:44:55 +0000
508+++ cppunit2/include/cpptl/conststring.h 2009-03-12 21:42:38 +0000
509@@ -891,8 +891,8 @@
510 inline void
511 ConstString::swap( ConstString &other )
512 {
513- CppTL::swap( length_, other.length_ );
514- CppTL::swap( buffer_, other.buffer_ );
515+ CppTL::trivialSwap( length_, other.length_ );
516+ CppTL::trivialSwap( buffer_, other.buffer_ );
517 }
518
519
520@@ -1098,9 +1098,9 @@
521 inline void
522 StringBuffer::swap( StringBuffer &other )
523 {
524- CppTL::swap( capacity_, other.capacity_ );
525- CppTL::swap( length_, other.length_ );
526- CppTL::swap( buffer_, other.buffer_ );
527+ CppTL::trivialSwap( capacity_, other.capacity_ );
528+ CppTL::trivialSwap( length_, other.length_ );
529+ CppTL::trivialSwap( buffer_, other.buffer_ );
530 }
531
532
533
534=== modified file 'cppunit2/include/cpptl/intrusiveptr.h'
535--- cppunit2/include/cpptl/intrusiveptr.h 2006-09-06 17:23:26 +0000
536+++ cppunit2/include/cpptl/intrusiveptr.h 2009-03-12 21:42:38 +0000
537@@ -103,7 +103,7 @@
538
539 void swap( ThisType &other )
540 {
541- CppTL::swap( p_, other.p_ );
542+ CppTL::trivialSwap( p_, other.p_ );
543 }
544
545 ThisType &operator =( const ThisType &other )
546
547=== modified file 'cppunit2/include/cpptl/scopedptr.h'
548--- cppunit2/include/cpptl/scopedptr.h 2005-07-04 06:09:30 +0000
549+++ cppunit2/include/cpptl/scopedptr.h 2009-03-12 21:42:38 +0000
550@@ -23,7 +23,7 @@
551
552 void swap( SelfType &other )
553 {
554- CppTL::swap( p_, other.p_ );
555+ CppTL::trivialSwap( p_, other.p_ );
556 }
557
558 void reset( PointeeType *p = 0 )
559
560=== modified file 'cppunit2/include/cpput/extendeddata.h'
561--- cppunit2/include/cpput/extendeddata.h 2006-09-03 05:15:49 +0000
562+++ cppunit2/include/cpput/extendeddata.h 2008-12-25 17:01:58 +0000
563@@ -15,7 +15,7 @@
564 * \code
565 * class SomeClass : public TestExtendedDataFactory {
566 * public:
567- * static void enrichTest( Test &test ) {
568+ * static void enrichTest( MetaData &test ) {
569 * CppUT::TestExtendedDataHelper( test )( describe( "Test conversion" ),
570 * timeOut( 30.0 ),
571 * depends( "testInit" ) );
572@@ -26,7 +26,7 @@
573 * The above code sample is equivalent to:
574 *
575 * \code
576- * static void enrichTest( Test &test ) {
577+ * static void enrichTest( MetaData &test ) {
578 * test.setDescription( "Test conversion" );
579 * test.setTimeOut( 30.0 );
580 * test.setDependenciesFromPackedString( "testInit" );
581@@ -41,13 +41,13 @@
582 class TestExtendedDataHelper
583 {
584 public:
585- TestExtendedDataHelper( Test &test );
586+ TestExtendedDataHelper( MetaData &test );
587 virtual ~TestExtendedDataHelper();
588
589- Test &operator()( const TestExtendedData &data ) const;
590+ MetaData &operator()( const TestExtendedData &data ) const;
591
592 private:
593- Test &test_;
594+ MetaData &test_;
595 };
596
597
598@@ -58,7 +58,7 @@
599 public:
600 virtual ~TestExtendedData();
601
602- virtual void apply( Test &test ) const = 0;
603+ virtual void apply( MetaData &test ) const = 0;
604
605 TestExtendedDataList operator ,( const TestExtendedData &other ) const;
606 };
607@@ -66,13 +66,22 @@
608
609 /*! \ingroup group_testfixture
610 */
611+class CPPUT_API NoTestExtendedData : public TestExtendedData
612+{
613+public: // overridden from TestExtendedData
614+ void apply( MetaData &test ) const;
615+};
616+
617+
618+/*! \ingroup group_testfixture
619+ */
620 class TestExtendedDataList : public TestExtendedData
621 {
622 public:
623 TestExtendedDataList( const TestExtendedData &left,
624 const TestExtendedData &right );
625 public: // overridden from TestExtendedData
626- void apply( Test &test ) const;
627+ void apply( MetaData &test ) const;
628
629 private:
630 const TestExtendedData &left_;
631@@ -88,7 +97,7 @@
632 DescriptionData( const std::string &description );
633
634 public: // overridden from TestExtendedData
635- void apply( Test &test ) const;
636+ void apply( MetaData &test ) const;
637
638 private:
639 std::string description_;
640@@ -103,7 +112,7 @@
641 TimeOutData( double timeOutInSeconds );
642
643 public: // overridden from TestExtendedData
644- void apply( Test &test ) const;
645+ void apply( MetaData &test ) const;
646
647 private:
648 double timeOutInSeconds_;
649@@ -118,7 +127,7 @@
650 DependenciesData( const std::string &dependencies );
651
652 public: // overridden from TestExtendedData
653- void apply( Test &test ) const;
654+ void apply( MetaData &test ) const;
655 private:
656 std::string dependencies_;
657 };
658@@ -132,7 +141,7 @@
659 GroupData( const std::string &groupName );
660
661 public: // overridden from TestExtendedData
662- void apply( Test &test ) const;
663+ void apply( MetaData &test ) const;
664 private:
665 std::string groupName_;
666 };
667@@ -149,7 +158,7 @@
668
669 static TimeOutData timeOut( double timeOutInSeconds );
670
671- static DependenciesData depends( const std::string &dependencies );
672+ static DependenciesData depends( const std::string &dependency );
673
674 static GroupData group( const std::string &groupName );
675 };
676
677=== modified file 'cppunit2/include/cpput/forwards.h'
678--- cppunit2/include/cpput/forwards.h 2008-07-13 06:19:20 +0000
679+++ cppunit2/include/cpput/forwards.h 2008-12-21 17:51:13 +0000
680@@ -7,18 +7,21 @@
681 namespace CppUT {
682
683 class AbortingAssertionException;
684-class AbstractTestCase;
685-class AbstractTestSuite;
686+class TestCase;
687 class Message;
688 class StandardTestExceptionGuard;
689-class Test;
690-class TestCase;
691+class MetaData;
692+class TestMeta;
693 class TestExtendedData;
694 class TestExtendedDataList;
695 class ExceptionGuardElement;
696 class ExceptionGuard;
697-class TestSuite;
698-class TestVisitor;
699+
700+// registry.h
701+class Registry;
702+class StaticSuite;
703+class Suite;
704+class SuiteMeta;
705
706 // testinfo.h
707 class CheckerResult;
708@@ -36,12 +39,10 @@
709 typedef CppTL::ConstString ResourceName;
710
711 // for ...
712-typedef CppTL::IntrusivePtr<AbstractTestCase> AbstractTestCasePtr;
713-typedef CppTL::IntrusivePtr<AbstractTestSuite> AbstractTestSuitePtr;
714+typedef CppTL::IntrusivePtr<TestCase> TestCasePtr;
715 typedef CppTL::IntrusivePtr<ExceptionGuardElement> ExceptionGuardElementPtr;
716-typedef CppTL::IntrusivePtr<Test> TestPtr;
717+//typedef CppTL::IntrusivePtr<MetaData> TestPtr;
718 typedef CppTL::IntrusivePtr<TestInfo> TestInfoPtr;
719-typedef CppTL::IntrusivePtr<TestSuite> TestSuitePtr;
720 typedef CppTL::IntrusivePtr<TestResultUpdater> TestResultUpdaterPtr;
721
722 // for resource.h
723
724=== added file 'cppunit2/include/cpput/interface.h'
725--- cppunit2/include/cpput/interface.h 1970-01-01 00:00:00 +0000
726+++ cppunit2/include/cpput/interface.h 2008-12-20 10:45:17 +0000
727@@ -0,0 +1,119 @@
728+#ifndef CPPUT_INTERFACE_INCLUDED_H
729+# define CPPUT_INTERFACE_INCLUDED_H
730+
731+namespace CppUT {
732+
733+ /** Minimized and simple interface that expose all user oriented features.
734+ * All implementation details are hidden behind pimpl idiom.
735+ * Tests discovery:
736+ * - list all tests
737+ * - greping by test name, with stars matching
738+ * Adding a test factory:
739+ * - C function
740+ * - Macro fixture
741+ * - Polymorphic fixture
742+ * Executing a list of test
743+ * - events on test execution
744+ * - list of all results
745+ * Writing tests:
746+ * - assertions
747+ * - string converter
748+ * - equality comparison
749+ * => prefer predicates instead of operator customization (but may still be useful).
750+ * - using resources
751+ * Resources factory:
752+ * - declaring resources
753+ *
754+ * - Major refactoring:
755+ * Takes down the registry and replace it with a test case registry
756+ * => we next to register factory for test case, not for test suite
757+ * => test suite becomes only organizational element likes group
758+ * => test suite just have a name & a parent suite name
759+
760+1) Split TestCase into
761+- TestMeta
762+ => all description stuff:
763+ - Test base class interface
764+ - requireResource()
765+ - factory function to create TestCase instance
766+- TestCase
767+ => all behavior stuffs:
768+ - virtual setUp/runTest/tearDown
769+2) LightTestRunner
770+- accept TestMeta as input, not Test
771+
772+How to proceed:
773+Step 1: introducing the test case factory
774+1) Rename TestCase to TestMeta
775+2) Change fixture factory to accept a factory for the fixture instead of an instance
776+3) Introduce new TestCase class with setUp/run/tearDown
777+4) Change parent class of subclass of TestMeta to TestCase and
778+ create the TestMeta using makeFixtureTestCase
779+
780+How to handle abstract test case:
781+- test may be defined in abstract base class
782+=> fixture factory is only available if fixture was instantiated.
783+conclusion:
784+Subclassing need to be reworked to:
785+- instantiate the test case for real when a concrete derived class exist
786+- store an abstract test meta in suite
787+- materialize on concrete class
788+
789+
790+Need to separate Suite from TestMeta.
791+=> break the inheritance, only test cases are runnable
792+
793+Go for minimal test suite for now:
794+- has a name
795+- may have a parent test suite
796+- may have child test suites
797+- may have TestCaseMeta
798+
799+How and where are suite stored ?
800+=> want to make path separator configurable
801+=> this means that static parent/child relationship must be stored
802+=> but interpretation occurs at run-time
803+=> need to keep a list of TestMeta associated to a suite
804+
805+
806+
807+*/
808+
809+
810+/// Parent suite macro below can be implemented as follow:
811+/// Alls tests between BEGIN / END are registered in the specified suite.
812+/// @param name use '/' to separate parent and child suite
813+/// Starts the name with '/' to make the suite a root suite visible to all.
814+/// Notes: this can be implemented as a set of nested anonymous namespace:
815+/// using CppUT::parentSuite;
816+/// namespace { // CPPUT_BEGIN_SUITE( "Trading" )
817+/// const char *currentSuite = "Trading";
818+/// namespace { // CPPUT_BEGIN_SUITE( "Forex" )
819+/// const char *currentSuite = "Forex";
820+/// } // CPPUT_END_SUITE
821+/// } // CPPUT_END_SUITE
822+
823+
824+// Parent Suite Declaration
825+#define CPPUT_SET_DEFAULT_SUITE( name )
826+#define CPPUT_SUITE( name )
827+#define CPPUT_NESTED_SUITE( name )
828+#define CPPUT_END_NESTED_SUITE
829+#define CPPUT_END_SUITE
830+
831+// Parenting suite
832+#define CPPUT_PARENT_SUITE( parentName, childName )
833+
834+// Plain C function
835+#define CPPUT_REGISTER_TEST_FUNCTION( testFunction )
836+#define CPPUT_TEST( testFunctionName )
837+
838+// Lightweight fixture
839+#define CPPUT_TEST_LIGHT_FIXTURE( FixtureType, testName )
840+#define CPPUT_TEST_LIGHT_FIXTURE_WITH_SPECIFICS( FixtureType, testName, specifics )
841+
842+} // namespace CppUT
843+
844+
845+
846+#endif // CPPUT_INTERFACE_INCLUDED_H
847
848=== modified file 'cppunit2/include/cpput/lightfixture.h'
849--- cppunit2/include/cpput/lightfixture.h 2007-08-15 15:48:29 +0000
850+++ cppunit2/include/cpput/lightfixture.h 2009-03-13 20:59:56 +0000
851@@ -6,38 +6,54 @@
852 # include "testcase.h"
853 # include "registry.h"
854
855-/*! \bief Implementation detail for light fixture: make class name.
856- */
857-#define _CPPUT_LF_CLASS( FixtureType, testName ) \
858- FixtureType##_##testName
859-
860-/*! \brief Implementation detail for light fixture.
861- * Implementation Notes: a class deriving from the \c FixtureType is created
862- * for each test. The user actually implement the member function named after \c testName.
863- */
864-#define _CPPUT_TEST_LIGHT_FIXTURE_IMPL( FixtureType, testName, specificsCode ) \
865- class _CPPUT_LF_CLASS(FixtureType,testName) : public FixtureType \
866- , public ::CppUT::TestExtendedDataFactory \
867- { \
868- public: \
869- static ::CppUT::TestPtr cpputMakeTest() /* TestFactory */ \
870- { \
871- ::CppUT::TestPtr test( ::CppUT::makeTestCase( \
872- &_CPPUT_LF_CLASS(FixtureType,testName)::cpputTest, #testName ) ); \
873- specificsCode \
874- return test; \
875- } \
876- public: \
877- static void cpputTest() \
878- { \
879- _CPPUT_LF_CLASS(FixtureType,testName) fixture; \
880- fixture.testName(); \
881- } \
882- void testName(); \
883- }; \
884- CPPUT_REGISTER_TESTFACTORY_IN( &_CPPUT_LF_CLASS(FixtureType,testName)::cpputMakeTest, \
885- #FixtureType ); \
886- void _CPPUT_LF_CLASS(FixtureType,testName)::testName()
887+namespace CppUT {
888+ namespace Impl {
889+ inline TestMeta
890+ declareFixtureTestCase( TestCaseFactoryFn factory,
891+ const char *fixtureSuiteName,
892+ const char *testCaseName,
893+ Suite &parentSuite )
894+ {
895+ TestMeta test( factory, testCaseName );
896+ parentSuite.makeNestedSuite( fixtureSuiteName ).add( test );
897+ return test;
898+ }
899+
900+ inline TestMeta
901+ declareFixtureTestCase( TestCaseFactoryFn factory,
902+ const char *fixtureSuiteName,
903+ const char *testCaseName,
904+ const ::CppUT::TestExtendedData &metaData,
905+ Suite &parentSuite )
906+ {
907+ MetaData testMetaData( testCaseName );
908+ metaData.apply( testMetaData );
909+ TestMeta test( factory, testMetaData );
910+ parentSuite.makeNestedSuite( fixtureSuiteName ).add( test );
911+ return test;
912+ }
913+ }
914+}
915+
916+#define _CPPUT_FIXTURE_TEST_COMMON( FixtureType, testFunction ) \
917+ class FixtureType##testFunction : public FixtureType \
918+ { \
919+ static ::CppUT::TestMeta testMeta; \
920+ public: \
921+ static ::CppUT::TestCase *cpputFactory() \
922+ { \
923+ return new FixtureType##testFunction(); \
924+ } \
925+ \
926+ public: /* overriden from CppUT::TestCase */ \
927+ virtual void run(); \
928+ }; \
929+ \
930+ ::CppUT::TestMeta FixtureType##testFunction::testMeta( \
931+ ::CppUT::Impl::declareFixtureTestCase( \
932+ &FixtureType##testFunction::cpputFactory, \
933+ #FixtureType, \
934+ #testFunction, \
935
936 /*! \brief Declare and register a light fixture test case.
937 * The test case is named after the function name and register in the suite named after
938@@ -57,8 +73,12 @@
939 * }
940 * \endCode
941 */
942-#define CPPUT_TEST_LIGHT_FIXTURE( FixtureType, testName ) \
943- _CPPUT_TEST_LIGHT_FIXTURE_IMPL( FixtureType, testName, (void)0; )
944+#define CPPUT_FIXTURE_TEST( FixtureType, testFunction ) \
945+ _CPPUT_FIXTURE_TEST_COMMON( FixtureType, testFunction ) \
946+ CPPUT_CURRENT_SUITE() ) ); \
947+ \
948+ void FixtureType##testFunction::run()
949+
950
951 /*! \brief Declare and register a light fixture test case with extended data.
952 * The test case is named after the function name and register in the suite named after
953@@ -78,19 +98,16 @@
954 * }
955 * \endCode
956 */
957-#define CPPUT_TEST_LIGHT_FIXTURE_WITH_SPECIFICS( FixtureType, testName, specifics ) \
958- _CPPUT_TEST_LIGHT_FIXTURE_IMPL( FixtureType, testName, \
959- ( specifics ).apply( *test ); )
960-
961-/*! \brief register the light fixture suite to the default Registry suite.
962- */
963-#define CPPUT_REGISTER_LIGHT_FIXTURE( FixtureType ) \
964- CPPUT_REGISTER_SUITE_RELATIONSHIP_TO_DEFAULT( #FixtureType )
965-
966-/*! \brief register the light fixture suite to the specified Registry suite.
967- */
968-#define CPPUT_REGISTER_LIGHT_FIXTURE_IN( FixtureType, parentSuiteName ) \
969- CPPUT_REGISTER_SUITE_RELATIONSHIP( #FixtureType, parentSuiteName )
970+#define CPPUT_FIXTURE_TEST_WITH_META( FixtureType, testFunction, metaData ) \
971+ _CPPUT_FIXTURE_TEST_COMMON( FixtureType, testFunction ) \
972+ metaData, \
973+ CPPUT_CURRENT_SUITE() ) ); \
974+ \
975+ void FixtureType##testFunction::run()
976+
977+#define CPPUT_EXPORTED_FIXTURE_SUITE( FixtureType, exportedVariableName ) \
978+ extern ::CppUT::SuiteMeta exportedVariableName( \
979+ CPPUT_CURRENT_SUITE().makeNestedSuite( #FixtureType ) )
980
981
982 #endif // CPPUT_LIGHTFIXTURE_H_INCLUDED
983
984=== modified file 'cppunit2/include/cpput/lighttestrunner.h'
985--- cppunit2/include/cpput/lighttestrunner.h 2008-12-18 22:15:59 +0000
986+++ cppunit2/include/cpput/lighttestrunner.h 2008-12-21 13:50:58 +0000
987@@ -3,6 +3,7 @@
988
989 # include <cpput/forwards.h>
990 # include <cpput/testinfo.h>
991+# include <cpput/registry.h>
992 # include <cpptl/intrusiveptr.h>
993 # include <deque>
994
995@@ -18,9 +19,9 @@
996
997 virtual ~LightTestRunner();
998
999- void addTest( const TestPtr &test );
1000+ void addSuite( const Suite &suite );
1001
1002- bool runAllTests();
1003+ bool runTests();
1004
1005 private: // overridden from TestResultUpdater
1006 virtual void addResultLog( const Json::Value &log );
1007@@ -28,9 +29,8 @@
1008 virtual void addResultAssertion( const Assertion &assertion );
1009
1010 private:
1011- void runTest( const TestPtr &test );
1012- void runTestSuite( const TestSuitePtr &suite );
1013- void runTestCase( const AbstractTestCasePtr &testCase );
1014+ void runTestSuite( const Suite &suite );
1015+ void runTestCase( const TestMeta &testCase );
1016 CppTL::ConstString getTestPath() const;
1017 void reportFailure( const Assertion &failure );
1018 void reportLog( const Json::Value &log );
1019@@ -41,8 +41,8 @@
1020 bool isLog_;
1021 };
1022
1023- typedef std::deque<TestPtr> Tests;
1024- Tests tests_;
1025+ typedef std::deque<Suite> SuitesToRun;
1026+ SuitesToRun suitesToRun_;
1027 typedef std::deque<CppTL::ConstString> TestPath;
1028 TestPath testPath_;
1029 CppTL::StringBuffer report_;
1030
1031=== renamed file 'cppunit2/include/cpput/test.h' => 'cppunit2/include/cpput/metadata.h'
1032--- cppunit2/include/cpput/test.h 2006-09-03 05:15:49 +0000
1033+++ cppunit2/include/cpput/metadata.h 2009-03-13 21:39:02 +0000
1034@@ -1,30 +1,37 @@
1035-#ifndef CPPUT_TEST_H_INCLUDED
1036-# define CPPUT_TEST_H_INCLUDED
1037+#ifndef CPPUT_METADATA_H_INCLUDED
1038+# define CPPUT_METADATA_H_INCLUDED
1039
1040 # include <cpput/forwards.h>
1041 # include <json/value.h>
1042 # include <cpptl/conststring.h>
1043 # include <cpptl/intrusiveptr.h>
1044+# include <cpput/extendeddata.h>
1045 # include <string>
1046
1047
1048 namespace CppUT {
1049
1050-class TestVisitor;
1051-
1052 /*! This class represents the data about a test.
1053 * \ingroup group_testcases
1054 *
1055- * It is the base class of AbstractTestCase and AbstractTestSuite.
1056+ * It is the base class of TestMeta.
1057 */
1058-class CPPUT_API Test : public CppTL::IntrusiveCount
1059+class CPPUT_API MetaData : public CppTL::IntrusiveCount
1060 {
1061- // ensure that this class can only be derived by AbstractTestCase and
1062- // AbstractTestSuite.
1063- friend class AbstractTestCase;
1064- friend class AbstractTestSuite;
1065 public:
1066- virtual ~Test()
1067+ explicit MetaData( const std::string &name )
1068+ {
1069+ info_["configuration/name"] = name;
1070+ }
1071+
1072+ explicit MetaData( const std::string &name,
1073+ const TestExtendedData &metaDataFactory )
1074+ {
1075+ info_["configuration/name"] = name;
1076+ metaDataFactory.apply( *this );
1077+ }
1078+
1079+ virtual ~MetaData()
1080 {
1081 }
1082
1083@@ -68,13 +75,6 @@
1084 return info_["configuration"]["groups"][index].asString();
1085 }
1086
1087- /// @warning You must never change the name of the test after
1088- /// registering the test or scheduling it for running.
1089- void setName( const std::string &name )
1090- {
1091- info_["configuration/name"] = name;
1092- }
1093-
1094 //OpenTest::PropertiesAccessor info() const
1095 //{
1096 // return info_.accessor();
1097@@ -87,28 +87,6 @@
1098 // return info_;
1099 //}
1100
1101- /// Returns \c true if the class is derived from AbstractTestSuite.
1102- bool isTestSuite() const
1103- {
1104- return !isTestCase();
1105- }
1106-
1107- virtual void accept( TestVisitor &visitor ) = 0;
1108-
1109- /// Returns \c true if the class is derived from AbstractTestCase.
1110- virtual bool isTestCase() const = 0;
1111-
1112-private:
1113- Test()
1114- {
1115- setName( "<undefined>" );
1116- }
1117-
1118- Test( const std::string &name )
1119- {
1120- setName( name );
1121- }
1122-
1123 private:
1124 Json::Value info_;
1125 };
1126@@ -116,4 +94,4 @@
1127
1128 } // namespace CppUT
1129
1130-#endif // CPPUT_TEST_H_INCLUDED
1131+#endif // CPPUT_METADATA_H_INCLUDED
1132
1133=== modified file 'cppunit2/include/cpput/parametrizedsource.h'
1134--- cppunit2/include/cpput/parametrizedsource.h 2005-02-27 13:38:28 +0000
1135+++ cppunit2/include/cpput/parametrizedsource.h 2008-12-11 20:28:30 +0000
1136@@ -78,7 +78,7 @@
1137 SuitePaths suitePath_;
1138 };
1139 /*
1140-class ParametrizedTestCase : public AbstractTestCase
1141+class ParametrizedTestCase : public TestCase
1142 {
1143 public:
1144 };
1145
1146=== modified file 'cppunit2/include/cpput/registry.h'
1147--- cppunit2/include/cpput/registry.h 2007-08-15 09:20:57 +0000
1148+++ cppunit2/include/cpput/registry.h 2008-12-21 13:50:58 +0000
1149@@ -1,288 +1,248 @@
1150-#ifndef CPPUT_REGISTRY_H_INCLUDED
1151-# define CPPUT_REGISTRY_H_INCLUDED
1152-
1153-# include <cpput/forwards.h>
1154-# include <cpptl/conststring.h>
1155-# include <cpptl/functor.h>
1156-# include <deque>
1157-# include <map>
1158-
1159-
1160-namespace CppUT {
1161-
1162-/*! \ingroup group_testregistry
1163-*/
1164-typedef CppTL::Functor0R<TestPtr> TestFactory;
1165-
1166-/*! \ingroup group_testregistry
1167-*/
1168-typedef int TestFactoryId;
1169-
1170-
1171-/*! \ingroup group_testregistry
1172- * Static registry for all tests.
1173- * Any suite or test added to the registry by a dynamic library that contains test should
1174- * be removed using remove(). Helper macros take carre of this.
1175- */
1176-class CPPUT_API Registry
1177-{
1178-public:
1179- static std::string defaultParentSuiteName();
1180-
1181- static Registry &instance();
1182-
1183- Registry();
1184-
1185- void addChild( const std::string &parentSuiteName,
1186- const std::string &childSuiteName );
1187- void addChildToDefault( const std::string &childSuiteName );
1188-
1189- bool removeChild( const std::string &parentSuiteName,
1190- const std::string &childSuiteName );
1191-
1192- TestFactoryId add( const std::string &parentSuiteName,
1193- const TestFactory &testFactory );
1194- TestFactoryId add( const std::string &parentSuiteName,
1195- TestPtr (*factory)() );
1196- TestFactoryId add( const std::string &parentSuiteName,
1197- TestPtr (*factory)( const std::string &suiteName ),
1198- const std::string &suiteName = std::string("") );
1199-
1200- TestFactoryId addToDefault( const TestFactory &testFactory );
1201- TestFactoryId addToDefault( TestPtr (*factory)() );
1202- TestFactoryId addToDefault( TestPtr (*factory)( const std::string &suiteName ),
1203- const std::string &suiteName = std::string("") );
1204-
1205- bool remove( TestFactoryId testFactoryId );
1206-
1207- TestSuitePtr createTests( const std::string &suiteName ) const;
1208-
1209- TestSuitePtr createDefaultTests() const;
1210-
1211- void addCreatedTests( const std::string &suiteName,
1212- const TestSuitePtr &suite ) const;
1213-
1214-private:
1215- void addChildSuite( const std::string &suiteName,
1216- const TestSuitePtr &suite ) const;
1217-
1218- void addSuiteRegisteredTests( const std::string &suiteName,
1219- const TestSuitePtr &suite ) const;
1220-
1221- TestFactoryId nextFactoryId();
1222-
1223- typedef std::pair<TestFactory, TestFactoryId> TestFactoryWithId;
1224-
1225- typedef std::deque<TestFactoryWithId> TestFactories;
1226- typedef std::map<CppTL::ConstString,TestFactories> TestFactoryRegistry;
1227- TestFactoryRegistry registry_;
1228-
1229- typedef std::multimap<CppTL::ConstString,CppTL::ConstString> ParentChildRelationShips;
1230- ParentChildRelationShips relations_;
1231-
1232- typedef std::map<TestFactoryId,CppTL::ConstString> TestFactoryParentSuiteById;
1233- TestFactoryParentSuiteById parentSuiteById_;
1234-
1235- TestFactoryId nextId_;
1236-};
1237-
1238-
1239-namespace Impl {
1240-
1241- enum RegisterToNamedSuiteTag {
1242- registerToNamedSuite
1243- };
1244-
1245-} // namespace Impl
1246-
1247-
1248-/*! \ingroup group_testregistry
1249-*/
1250-template<class SuiteType>
1251-class SuiteRegisterer
1252-{
1253-public:
1254- SuiteRegisterer()
1255- {
1256- testFactoryId_ = Registry::instance().addToDefault( &SuiteType::suite );
1257- }
1258-
1259- SuiteRegisterer( const std::string &suiteName )
1260- {
1261- testFactoryId_ = Registry::instance().addToDefault( &SuiteType::suite,
1262- suiteName );
1263- }
1264-
1265- SuiteRegisterer( Impl::RegisterToNamedSuiteTag,
1266- const std::string &parentSuiteName )
1267- {
1268- testFactoryId_ = Registry::instance().add( parentSuiteName,
1269- &SuiteType::suite );
1270- }
1271-
1272- SuiteRegisterer( Impl::RegisterToNamedSuiteTag,
1273- const std::string &parentSuiteName,
1274- const std::string &suiteName )
1275- {
1276- testFactoryId_ = Registry::instance().add( parentSuiteName,
1277- &SuiteType::suite,
1278- suiteName );
1279- }
1280-
1281- ~SuiteRegisterer()
1282- {
1283- Registry::instance().remove( testFactoryId_ );
1284- }
1285-
1286-protected:
1287- SuiteRegisterer( TestFactoryId testFactoryId ):
1288- testFactoryId_( testFactoryId )
1289- {
1290- }
1291-
1292-private:
1293- TestFactoryId testFactoryId_;
1294-};
1295-
1296-
1297-
1298-/*! \ingroup group_testregistry
1299-*/
1300-#define CPPUT_REGISTER_NAMED_SUITE_TO_DEFAULT( TestFixtureType, suiteName ) \
1301- static CppUT::SuiteRegisterer< TestFixtureType > \
1302- CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )(suiteName);
1303-
1304-
1305-/*! \ingroup group_testregistry
1306-*/
1307-#define CPPUT_REGISTER_SUITE_TO_DEFAULT( TestFixtureType ) \
1308- static CppUT::SuiteRegisterer< TestFixtureType > \
1309- CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRegisterer );
1310-
1311-
1312-/*! \ingroup group_testregistry
1313-*/
1314-#define CPPUT_REGISTER_SUITE_IN( TestFixtureType, parentSuiteName ) \
1315- static CppUT::SuiteRegisterer< TestFixtureType > \
1316- CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRegisterer)( \
1317- CppUT::Impl::registerToNamedSuite, \
1318- parentSuiteName );
1319-
1320-
1321-/*! \ingroup group_testregistry
1322-*/
1323-#define CPPUT_REGISTER_NAMED_SUITE_IN( TestFixtureType, \
1324- parentSuiteName, \
1325- suiteName ) \
1326- static CppUT::SuiteRegisterer< TestFixtureType > \
1327- CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )( \
1328- CppUT::Impl::registerToNamedSuite, \
1329- parentSuiteName, \
1330- suiteName );
1331-
1332-/*! \ingroup group_testregistry
1333-*/
1334-class SuiteRelationshipRegisterer
1335-{
1336-public:
1337- explicit SuiteRelationshipRegisterer( const std::string &childSuiteName )
1338- : childSuiteName_( childSuiteName )
1339- , parentSuiteName_( Registry::defaultParentSuiteName() )
1340- {
1341- Registry::instance().addChildToDefault( childSuiteName );
1342- }
1343-
1344- SuiteRelationshipRegisterer( const std::string &parentSuiteName,
1345- const std::string &childSuiteName )
1346- : parentSuiteName_( parentSuiteName )
1347- , childSuiteName_( childSuiteName )
1348- {
1349- Registry::instance().addChild( parentSuiteName, childSuiteName );
1350- }
1351-
1352- ~SuiteRelationshipRegisterer()
1353- {
1354- Registry::instance().removeChild( parentSuiteName_.str(),
1355- childSuiteName_.str() );
1356- }
1357-
1358-private:
1359- CppTL::ConstString parentSuiteName_;
1360- CppTL::ConstString childSuiteName_;
1361-};
1362-
1363-
1364-/*! \ingroup group_testregistry
1365-*/
1366-#define CPPUT_REGISTER_SUITE_RELATIONSHIP( parentSuiteName, childSuiteName ) \
1367- static ::CppUT::SuiteRelationshipRegisterer \
1368- CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRelationShipRegisterer )( \
1369- parentSuiteName, \
1370- childSuiteName )
1371-
1372-
1373-/*! \ingroup group_testregistry
1374-*/
1375-#define CPPUT_REGISTER_SUITE_RELATIONSHIP_TO_DEFAULT( childSuiteName ) \
1376- static ::CppUT::SuiteRelationshipRegisterer \
1377- CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRelationShipRegisterer )( \
1378- childSuiteName )
1379-
1380-
1381-// Plain C function tests
1382-
1383-/*! \ingroup group_testregistry
1384- * \brief Helper object used to statically register a TestFactory.
1385- */
1386-class TestFactoryRegisterer
1387-{
1388-public:
1389- typedef TestPtr (*FactoryFn)();
1390-
1391- TestFactoryRegisterer( FactoryFn testFactory )
1392- {
1393- testFactoryId_ = Registry::instance().addToDefault( CppTL::cfn0r<TestPtr>(testFactory) );
1394- }
1395-
1396- TestFactoryRegisterer( TestFactory testFactory )
1397- {
1398- testFactoryId_ = Registry::instance().addToDefault( testFactory );
1399- }
1400-
1401- TestFactoryRegisterer( TestFactory testFactory, const std::string &parentSuiteName )
1402- {
1403- testFactoryId_ = Registry::instance().add( parentSuiteName, testFactory );
1404- }
1405-
1406- TestFactoryRegisterer( FactoryFn testFactory, const std::string &parentSuiteName )
1407- {
1408- testFactoryId_ = Registry::instance().add( parentSuiteName, CppTL::cfn0r<TestPtr>(testFactory) );
1409- }
1410-
1411- ~TestFactoryRegisterer()
1412- {
1413- Registry::instance().remove( testFactoryId_ );
1414- }
1415-
1416-private:
1417- TestFactoryId testFactoryId_;
1418-};
1419-
1420-/*! \ingroup group_testregistry
1421- * \brief Register the specified TestFactory in the default Registry suite.
1422- */
1423-#define CPPUT_REGISTER_TESTFACTORY_TO_DEFAULT( testFactory ) \
1424- static ::CppUT::TestFactoryRegisterer \
1425- CPPTL_MAKE_UNIQUE_NAME(cpputTestFactoryRegisterer)( testFactory )
1426-
1427-/*! \ingroup group_testregistry
1428- * \brief Register the specified TestFactory in the specified Registry suite.
1429- */
1430-#define CPPUT_REGISTER_TESTFACTORY_IN( testFactory, parentSuiteName ) \
1431- static ::CppUT::TestFactoryRegisterer \
1432- CPPTL_MAKE_UNIQUE_NAME(cpputTestFactoryRegisterer)( testFactory, parentSuiteName )
1433-
1434-} // namespace CppUT
1435-
1436-
1437-#endif // CPPUT_REGISTRY_H_INCLUDED
1438+#ifndef CPPUT_REGISTRY_H_INCLUDED
1439+# define CPPUT_REGISTRY_H_INCLUDED
1440+
1441+# include <cpput/forwards.h>
1442+# include <cpptl/conststring.h>
1443+# include <cpptl/functor.h>
1444+# include <deque>
1445+# include <map>
1446+
1447+namespace CppUT {
1448+ namespace Impl {
1449+ class RegistryImpl;
1450+ class SuiteImpl;
1451+
1452+ /// Creates a suite with the specified name and makes it the new default root suite.
1453+ /// The suite is nested into the current default root suite if any,
1454+ /// or the top level root suite otherwise.
1455+ /// @return Always \c NULL.
1456+ StaticSuite *makeAndSetDefaultRootSuite( const char *name );
1457+
1458+ /// Sets the default root suite to the top level root suite.
1459+ /// @return Always \c NULL.
1460+ StaticSuite *resetDefaultRootSuite();
1461+
1462+ /// Creates a suite with the specified name.
1463+ /// The suite is nested into the current default suite if any,
1464+ /// or the top level root suite otherwise.
1465+ /// @return Always \c NULL.
1466+ StaticSuite *makeNestedSuiteInDefaultRootSuite( const char *name );
1467+
1468+ /// Makes \c suite a child of \c parentSuite.
1469+ /// \c suite is removed from its current parent and make
1470+ /// a nested suite of \c parentSuite.
1471+ /// @return Always \c NULL.
1472+ StaticSuite *reparentSuite( Suite &parentSuite,
1473+ Suite &suite );
1474+
1475+
1476+ SuiteMeta currentSuite();
1477+ } // namespace Impl
1478+
1479+// internal
1480+#define _CPPUT_DECLARE_ROOT_SUITE( name, factory ) \
1481+ static ::CppUT::StaticSuite * \
1482+ CPPTL_MAKE_UNIQUE_NAME(cpputRootSuite) = \
1483+ ::CppUT::Impl::factory( name )
1484+
1485+
1486+///*! \ingroup group_testregistry
1487+class Suite
1488+{
1489+ friend class Impl::RegistryImpl;
1490+ friend class SuiteMeta;
1491+public:
1492+ /// Creates an invalid suite.
1493+ Suite();
1494+
1495+ /// Creates a new orphaned suite
1496+ Suite( const std::string &name );
1497+
1498+ //Suite( const Suite &other );
1499+ ~Suite();
1500+
1501+ //Suite &operator =( const Suite &other );
1502+
1503+ Suite parent() const;
1504+
1505+ bool isValid() const;
1506+
1507+ std::string name() const;
1508+
1509+ int nestedSuiteCount() const;
1510+ Suite nestedSuiteAt( int index ) const;
1511+ Suite nestedSuiteByName( const std::string &name ) const;
1512+ Suite makeNestedSuite( const std::string &name );
1513+
1514+ int testCaseCount() const;
1515+ const TestMeta *testCaseAt( int index ) const;
1516+
1517+ void add( const TestMeta &testCase );
1518+
1519+private:
1520+ Suite( Impl::SuiteImpl *suite );
1521+ Impl::SuiteImpl *impl_;
1522+};
1523+
1524+
1525+/*! \ingroup group_testregistry
1526+ * \brief Static Suite description handle.
1527+ */
1528+class SuiteMeta : public Suite
1529+{
1530+ friend class Impl::RegistryImpl;
1531+public:
1532+ ~SuiteMeta();
1533+
1534+ /// Returns the suite.
1535+ /// \internal Implementation detail of for CPPUT_CURRENT_SUITE().
1536+ SuiteMeta &operator()();
1537+
1538+private:
1539+ explicit SuiteMeta( Impl::SuiteImpl *impl );
1540+};
1541+
1542+
1543+/*! \ingroup group_testregistry
1544+ * Static registry for all tests.
1545+ * Any suite or test added to the registry by a dynamic library that contains test should
1546+ * be removed using remove(). Helper macros take carre of this.
1547+ */
1548+class CPPUT_API Registry
1549+{
1550+public:
1551+ static Suite getRootSuite();
1552+
1553+ static std::string dump();
1554+
1555+private:
1556+
1557+//
1558+// static std::string defaultParentSuiteName();
1559+//
1560+// static Registry &instance();
1561+//
1562+// Registry();
1563+//
1564+// void addChild( const std::string &parentSuiteName,
1565+// const std::string &childSuiteName );
1566+// void addChildToDefault( const std::string &childSuiteName );
1567+//
1568+// bool removeChild( const std::string &parentSuiteName,
1569+// const std::string &childSuiteName );
1570+//
1571+// TestFactoryId add( const std::string &parentSuiteName,
1572+// const TestFactory &testFactory );
1573+// TestFactoryId add( const std::string &parentSuiteName,
1574+// TestPtr (*factory)() );
1575+// TestFactoryId add( const std::string &parentSuiteName,
1576+// TestPtr (*factory)( const std::string &suiteName ),
1577+// const std::string &suiteName = std::string("") );
1578+//
1579+// TestFactoryId addToDefault( const TestFactory &testFactory );
1580+// TestFactoryId addToDefault( TestPtr (*factory)() );
1581+// TestFactoryId addToDefault( TestPtr (*factory)( const std::string &suiteName ),
1582+// const std::string &suiteName = std::string("") );
1583+//
1584+// bool remove( TestFactoryId testFactoryId );
1585+//
1586+// TestSuitePtr createTests( const std::string &suiteName ) const;
1587+//
1588+// TestSuitePtr createDefaultTests() const;
1589+//
1590+// void addCreatedTests( const std::string &suiteName,
1591+// const TestSuitePtr &suite ) const;
1592+//
1593+//private:
1594+// void addChildSuite( const std::string &suiteName,
1595+// const TestSuitePtr &suite ) const;
1596+//
1597+// void addSuiteRegisteredTests( const std::string &suiteName,
1598+// const TestSuitePtr &suite ) const;
1599+//
1600+// TestFactoryId nextFactoryId();
1601+//
1602+// typedef std::pair<TestFactory, TestFactoryId> TestFactoryWithId;
1603+//
1604+// typedef std::deque<TestFactoryWithId> TestFactories;
1605+// typedef std::map<CppTL::ConstString,TestFactories> TestFactoryRegistry;
1606+// TestFactoryRegistry registry_;
1607+//
1608+// typedef std::multimap<CppTL::ConstString,CppTL::ConstString> ParentChildRelationShips;
1609+// ParentChildRelationShips relations_;
1610+//
1611+// typedef std::map<TestFactoryId,CppTL::ConstString> TestFactoryParentSuiteById;
1612+// TestFactoryParentSuiteById parentSuiteById_;
1613+//
1614+// TestFactoryId nextId_;
1615+};
1616+
1617+
1618+/*! \ingroup group_testregistry
1619+ * \brief Set the default test suite.
1620+ * This is a convenience function to be used in an header. It defined the default
1621+ * parent suite for all tests including that headers. This is typically used to
1622+ * group all tests of a given library under the same parent suite.
1623+ *
1624+ * \code
1625+ * // MyLib/testing.h
1626+ * #ifndef MYLIB_TESTING_H_INCLUDED
1627+ * # define MYLIB_TESTING_H_INCLUDED
1628+ * # include <cpput/registry.h>
1629+ * CPPUT_SET_DEFAULT_SUITE( "MyLib" );
1630+ * #endif
1631+ * // MyLib/test1.cpp
1632+ * #include "testing.h"
1633+ * // TestCase "test1" will be placed into the suite "MyLib"
1634+ * CPPUT_TEST( test1 ) { // ...
1635+ * }
1636+ * // MyLib/test2.cpp
1637+ * #include "testing.h"
1638+ * // TestCase "test1" will be placed into the suite "MyLib"
1639+ * CPPUT_TEST( test1 ) { // ...
1640+ * }
1641+ * \endcode
1642+ * \warning You must use CPPUT_NESTED_SUITE if you want to put test in a child suite of
1643+ * MyLib.
1644+ */
1645+#define CPPUT_SET_DEFAULT_SUITE( name ) \
1646+ namespace { \
1647+ _CPPUT_DECLARE_ROOT_SUITE( name, makeAndSetDefaultRootSuite ); \
1648+ }
1649+
1650+/*! \ingroup group_testregistry
1651+ * \brief Returns the suite test will register in the context were the macro occurs.
1652+ * Notes: this is mostly an implementation detail. Should not need this unless you are
1653+ * creating some new kind of test case factor like CPPUT_TEST, CPPUT_FIXTURE_TEST...
1654+ * @return This macro expand into an expression of type CppUT::SuiteMeta.
1655+ */
1656+#define CPPUT_CURRENT_SUITE() \
1657+ ::CppUT::Impl::currentSuite()
1658+
1659+
1660+/*! \ingroup group_testregistry
1661+ * \brief Declares the root parent suite of tests until CPPUT_END_SUITE.
1662+ */
1663+#define CPPUT_SUITE( name ) \
1664+ _CPPUT_DECLARE_ROOT_SUITE( name, makeNestedSuiteInDefaultRootSuite ); \
1665+ namespace
1666+
1667+#define CPPUT_SUITE_REGISTER( FixtureType ) \
1668+ static ::CppUT::StaticSuite * \
1669+ CPPTL_MAKE_UNIQUE_NAME(cpputRegisterFixtureSuite) = \
1670+ ::CppUT::Impl::reparentSuite( CPPUT_CURRENT_SUITE(), \
1671+ FixtureType :: suite() )
1672+
1673+} // namespace CppUT
1674+
1675+
1676+namespace {
1677+ // Cause the static initializer to be called in each translation unit,
1678+ // Reset the current suite to the top root suite.
1679+ static ::CppUT::StaticSuite *cpputTopRootSuite =
1680+ ::CppUT::Impl::resetDefaultRootSuite();
1681+} // end anonymous namespace
1682+
1683+
1684+
1685+#endif // CPPUT_REGISTRY_H_INCLUDED
1686
1687=== modified file 'cppunit2/include/cpput/tablefixture.h'
1688--- cppunit2/include/cpput/tablefixture.h 2007-08-16 13:51:04 +0000
1689+++ cppunit2/include/cpput/tablefixture.h 2008-12-11 20:28:30 +0000
1690@@ -453,7 +453,7 @@
1691 };
1692
1693
1694- class TableFixture : public AbstractTestCase
1695+ class TableFixture : public TestCase
1696 {
1697 public:
1698 typedef void (TableFixture::*ActionFn)();
1699
1700=== modified file 'cppunit2/include/cpput/testcase.h'
1701--- cppunit2/include/cpput/testcase.h 2008-07-13 06:19:20 +0000
1702+++ cppunit2/include/cpput/testcase.h 2009-03-13 21:39:02 +0000
1703@@ -2,9 +2,10 @@
1704 # define CPPUT_TESTCASE_H_INCLUDED
1705
1706 # include <cpput/forwards.h>
1707+# include <cpput/extendeddata.h>
1708 # include <cpptl/functor.h>
1709 # include <cpput/resource.h>
1710-# include <cpput/test.h>
1711+# include <cpput/metadata.h>
1712 # include <string>
1713 # include <set>
1714 # include <vector>
1715@@ -12,41 +13,93 @@
1716
1717 namespace CppUT {
1718
1719+typedef CppTL::Functor0R<TestCase *> TestCaseFactory;
1720+typedef TestCase *(*TestCaseFactoryFn)();
1721+
1722 /*! \brief An abstract test case that can be run.
1723 * \ingroup group_testcases
1724 */
1725-class CPPUT_API AbstractTestCase : public Test
1726-{
1727-public:
1728- AbstractTestCase( const std::string &name );
1729+class CPPUT_API TestCase : public TestExtendedDataFactory
1730+{
1731+ friend class TestMeta;
1732+public:
1733+ TestCase();
1734+
1735+ virtual ~TestCase();
1736+
1737+ virtual void setUp();
1738+
1739+ virtual void run() = 0;
1740+
1741+ virtual void tearDown();
1742+
1743+ //void setUpTestResources();
1744+
1745+ //void tearDownTestResources();
1746+};
1747+
1748+
1749+template<class FunctorType>
1750+class FunctorTestCase : public TestCase
1751+{
1752+public:
1753+ static TestCase *factory( FunctorType run )
1754+ {
1755+ return new FunctorTestCase<FunctorType>( run );
1756+ }
1757+
1758+ FunctorTestCase( FunctorType run )
1759+ : run_( run )
1760+ {
1761+ }
1762+
1763+public: // overriden from TestCase
1764+ virtual void run()
1765+ {
1766+ run_();
1767+ }
1768+
1769+private:
1770+ FunctorType run_;
1771+};
1772+
1773+
1774+
1775+
1776+/*! \brief A test case that can be run.
1777+ * \ingroup group_testcases
1778+ */
1779+class CPPUT_API TestMeta : public MetaData
1780+{
1781+public:
1782+ TestMeta( const TestCaseFactory &factory,
1783+ const std::string &name );
1784+
1785+ TestMeta( TestCaseFactoryFn factory,
1786+ const std::string &name );
1787+
1788+ TestMeta( const TestCaseFactory &factory,
1789+ const MetaData &metaData );
1790+
1791+ TestMeta( TestCaseFactoryFn factory,
1792+ const MetaData &metaData );
1793
1794 /*! \brief Indicates that the test case requires the specified resource.
1795 *
1796 * The specified resource will be acquired before calling setUp() and
1797- * will be at the earliest after calling tearDown().
1798+ * will be released at the earliest after calling tearDown().
1799 *
1800 * \param resourceName Name of the resource to acquire.
1801 * \see ResourceHandlerRegistry, getResource().
1802 */
1803 void requireResource( const std::string &resourceName );
1804
1805- /*! \brief Prepare the acquisition of resource at the beginning of the test run.
1806- *
1807- * This must be called at the beginning of the test run for each test case.
1808- * It allows couting how many time a resource will be used and during
1809- * the test run, determining when a resource is no longer needed to free it.
1810- *
1811- * A ResourceLazyPtr is obtained for each required resource via the
1812- * ResourceHandlerRegistry.
1813- */
1814- void prepareResourceAcquisition();
1815-
1816 /*! \brief Run the test case using the default ExceptionGuard.
1817 *
1818 * The default exception guard only detect
1819 *
1820 */
1821- bool runTest();
1822+ bool runTest() const;
1823
1824 /*! \brief Run the test case using the specified ExceptionGuard.
1825 *
1826@@ -60,126 +113,94 @@
1827 * information for failure report from exception
1828 * that do not subclass std::exception.
1829 */
1830- bool runTest( const ExceptionGuard &guardsChain );
1831-
1832-public: // overridden from Test
1833- void accept( TestVisitor &visitor );
1834-
1835- /// Returns \c true if the class is derived from AbstractTestCase.
1836- bool isTestCase() const;
1837-
1838-// Those member functions are public to allow decoration of setUp/run/tearDown
1839-public:
1840- virtual void setUp();
1841-
1842- virtual void run() = 0;
1843-
1844- virtual void tearDown();
1845+ bool runTest( const ExceptionGuard &guardsChain ) const;
1846
1847 private:
1848+ typedef std::vector<ResourceLazyPtr> RequiredResources;
1849+
1850+ /// @todo fix framework to call this when scheduling tests
1851+ /*! \brief Prepare the acquisition of resource at the beginning of the test run.
1852+ *
1853+ * This must be called at the beginning of the test run for each test case.
1854+ * It allows couting how many time a resource will be used and during
1855+ * the test run, determining when a resource is no longer needed to free it.
1856+ *
1857+ * A ResourceLazyPtr is obtained for each required resource via the
1858+ * ResourceHandlerRegistry.
1859+ */
1860+ void prepareResourceAcquisition( RequiredResources &requiredResources) const;
1861+
1862 /*! \brief Acquires and setup the resource required by the test case.
1863 * Notes: If you decorate the test case, you must ensure
1864 * that you also decorate call to acquireTestResource().
1865 * \return \c true if all resources were acquired, \c false otherwise.
1866 */
1867- virtual void acquireTestResources( bool &allResourceAcquired );
1868-
1869- /*! \brief
1870- */
1871- void setUpTestResources();
1872-
1873- void tearDownTestResources();
1874+ void acquireTestResources( bool &allResourceAcquired ) const;
1875
1876 private:
1877 typedef std::set<ResourceName> ResourceNames;
1878 /// Required resource names
1879 ResourceNames resourceNames_;
1880- typedef std::vector<ResourceLazyPtr> RequiredResources;
1881- RequiredResources requiredResources_;
1882-};
1883-
1884-
1885-/*! \brief A test case that can be run.
1886- * \ingroup group_testcases
1887- */
1888-class CPPUT_API TestCase : public AbstractTestCase
1889-{
1890-public:
1891- TestCase( const CppTL::Functor0 &run,
1892- const std::string &name );
1893-
1894- TestCase( const CppTL::Functor0 &setUp,
1895- const CppTL::Functor0 &run,
1896- const CppTL::Functor0 &tearDown,
1897- const std::string &name );
1898-
1899-public: // overridden from AbstractTestCase
1900- void setUp();
1901-
1902- void run();
1903-
1904- void tearDown();
1905-
1906-private:
1907- CppTL::Functor0 setUp_;
1908- CppTL::Functor0 run_;
1909- CppTL::Functor0 tearDown_;
1910-};
1911-
1912-
1913-
1914-/*! \brief Creates a TestCase with the specified name and run functor.
1915- * \ingroup group_testcases
1916- */
1917-TestPtr CPPUT_API makeTestCase( void (*run)(),
1918- const std::string &name );
1919-
1920-
1921-/*! \brief Creates a TestCase with the specified name and run functor.
1922- * \ingroup group_testcases
1923- */
1924-TestPtr CPPUT_API makeTestCase( const CppTL::Functor0 &run,
1925- const std::string &name );
1926-
1927-
1928-/*! \brief Creates a TestCase with the specified name and setUp, run, and tearDown functor.
1929- * \ingroup group_testcases
1930- */
1931-TestPtr CPPUT_API makeTestCase( const CppTL::Functor0 &setUp,
1932- const CppTL::Functor0 &run,
1933- const CppTL::Functor0 &tearDown,
1934- const std::string &name );
1935-
1936-/*! \brief Creates a TestCase with the specified name that will always fail.
1937+ TestCaseFactory factory_;
1938+};
1939+
1940+// Implementation Notes:
1941+// Be wary of makeTestCase overloading. There is an optimizer bug in MSVC6 that cause it
1942+// to recursively call makeTestCase(CppTL::Functor0) when such an overloading exist
1943+// and makeTestCase is called with a functor. This has been worked around by removing that
1944+// overloading.
1945+
1946+
1947+
1948+/*! \brief Creates a TestMeta with the specified name and run function.
1949+ * \ingroup group_testcases
1950+ */
1951+TestMeta CPPUT_API makeTestCase( void (*run)(),
1952+ const std::string &name );
1953+
1954+
1955+/*! \brief Creates a TestMeta with the specified name, run function and metaData.
1956+ * \ingroup group_testcases
1957+ */
1958+TestMeta CPPUT_API makeTestCase( void (*run)(),
1959+ const MetaData &metaData );
1960+
1961+
1962+/*! \brief Creates a TestMeta with the specified name and run functor.
1963+ * \ingroup group_testcases
1964+ * FunctorType must be copyable and callable with no parameter.
1965+ */
1966+template<class FunctorType>
1967+TestMeta makeTestCase( FunctorType run,
1968+ const std::string &name )
1969+{
1970+ return TestMeta( CppTL::bind_cfnr( &FunctorTestCase<FunctorType>::factory, run ), name );
1971+}
1972+
1973+
1974+/*! \brief Creates a TestMeta with the specified name and run functor.
1975+ * \ingroup group_testcases
1976+ * FunctorType must be copyable and callable with no parameter.
1977+ */
1978+template<class FunctorType>
1979+TestMeta makeTestCase( FunctorType run,
1980+ const MetaData &metaData )
1981+{
1982+ return TestMeta( CppTL::bind_cfnr( &FunctorTestCase<FunctorType>::factory, run ), metaData );
1983+}
1984+
1985+
1986+/*! \brief Creates a TestMeta with the specified name that will always fail.
1987 * \ingroup group_testcases
1988 *
1989 * The test case run body simply call CPPUT_FAIL() with the specified message.
1990 *
1991- * This is useful for example when a TestSuite is created from input data
1992+ * This is useful for example when a Suite is created from input data
1993 * and those an invalid or inaccessible. A failing test case can be added to
1994 * the suite to report the error.
1995 */
1996-TestPtr CPPUT_API makeFailingTestCase( const std::string &name,
1997- const Message &message );
1998-
1999-/*! \brief Creates a TestCase using a fixture-like object.
2000- * \ingroup group_testcases
2001- *
2002- * The test case will delegate implementation of AbstractTestCase setUp() and
2003- * tearDown() to method of the same name on the given \c fixture object.
2004- */
2005-template<typename FixtureType>
2006-TestPtr makeFixtureTestCase( const CppTL::IntrusivePtr<FixtureType> &fixture,
2007- const CppTL::Functor0 &run,
2008- const std::string &name )
2009-{
2010- /// @todo Use traits to get smart-pointer type and allow for any type of smart-pointer
2011- return makeTestCase( CppTL::memfn0( fixture, &FixtureType::setUp ),
2012- run,
2013- CppTL::memfn0( fixture, &FixtureType::tearDown ),
2014- name );
2015-}
2016-
2017+TestMeta CPPUT_API makeFailingTestCase( const std::string &name,
2018+ const Message &message );
2019
2020 } // namespace CppUT
2021
2022
2023=== modified file 'cppunit2/include/cpput/testfixture.h'
2024--- cppunit2/include/cpput/testfixture.h 2005-11-13 09:12:01 +0000
2025+++ cppunit2/include/cpput/testfixture.h 2008-12-31 19:13:19 +0000
2026@@ -4,13 +4,217 @@
2027 # include <cpput/forwards.h>
2028 # include <cpput/extendeddata.h>
2029 # include <cpput/testcase.h>
2030-# include <cpput/testsuite.h>
2031+# include <cpput/registry.h>
2032 # include <cpput/translate.h>
2033 # include <cpptl/typename.h>
2034
2035
2036 namespace CppUT {
2037
2038+// //////////////////////////////////////////////////////////////////
2039+// //////////////////////////////////////////////////////////////////
2040+// Internal implementation macros
2041+// //////////////////////////////////////////////////////////////////
2042+// //////////////////////////////////////////////////////////////////
2043+
2044+// Internal
2045+// Prolog parts that is common to abstract, base and derived fixture classes.
2046+// Declares test case factory and run member function pointer.
2047+#define _CPPUT_TESTSUITE_COMMON( FixtureType ) \
2048+ public: \
2049+ void (FixtureType :: *cpputRun_)(); \
2050+ \
2051+ typedef FixtureType CppUTSelfType; \
2052+ \
2053+ struct FixtureTestFactory \
2054+ { \
2055+ typedef ::CppUT::TestCase *result_type; \
2056+ \
2057+ void (FixtureType :: *run_)(); \
2058+ ::CppUT::TestCaseFactoryFn factory_; \
2059+ \
2060+ \
2061+ static void addTest( ::CppUT::Suite &suite, \
2062+ ::CppUT::TestCaseFactoryFn fixtureFactory, \
2063+ const char *name, \
2064+ void (FixtureType :: *run)() ) \
2065+ { \
2066+ FixtureTestFactory factory; \
2067+ factory.run_ = run; \
2068+ factory.factory_ = fixtureFactory; \
2069+ suite.add( ::CppUT::TestMeta( ::CppTL::fn0r( factory ), \
2070+ name ) ); \
2071+ } \
2072+ \
2073+ static void addTest( ::CppUT::Suite &suite, \
2074+ ::CppUT::TestCaseFactoryFn fixtureFactory, \
2075+ const char *name, \
2076+ void (FixtureType :: *run)(), \
2077+ const ::CppUT::TestExtendedData &metaData ) \
2078+ { \
2079+ FixtureTestFactory factory; \
2080+ factory.run_ = run; \
2081+ factory.factory_ = fixtureFactory; \
2082+ suite.add( ::CppUT::TestMeta( ::CppTL::fn0r( factory ), \
2083+ ::CppUT::MetaData( name, metaData ) \
2084+ ) ); \
2085+ } \
2086+ \
2087+ \
2088+ ::CppUT::TestCase *operator()() const \
2089+ { \
2090+ FixtureType *fixture = static_cast<FixtureType *>( factory_() ); \
2091+ if ( fixture != 0 ) \
2092+ { \
2093+ fixture->cpputClearRunnable(); \
2094+ fixture->cpputRun_ = run_; \
2095+ } \
2096+ return fixture; \
2097+ } \
2098+ }; \
2099+ \
2100+ \
2101+ virtual void cpputClearRunnable() \
2102+ { \
2103+ cpputRun_ = 0; \
2104+ }
2105+
2106+
2107+// Internal
2108+// Part that is common to all concrete fixture classes
2109+// Declares fixture, and suite factories.
2110+#define _CPPUT_TESTSUITE_COMMON_CONCRETE( FixtureType ) \
2111+ static ::CppUT::TestCase *fixtureFactory() \
2112+ { \
2113+ return new FixtureType(); \
2114+ } \
2115+ \
2116+ static ::CppUT::Suite suite() \
2117+ { \
2118+ ::CppUT::Suite thisSuite( #FixtureType ); \
2119+ addTests( thisSuite ); \
2120+ return thisSuite; \
2121+ } \
2122+ \
2123+ static void addTests( ::CppUT::Suite &suite, \
2124+ ::CppUT::TestCaseFactoryFn factory = &FixtureType :: fixtureFactory )\
2125+ {
2126+
2127+// Internal
2128+// Part that is common to all abstract fixture classes.
2129+// Declares suite factory.
2130+# define _CPPUT_TESTSUITE_COMMON_ABSTRACT( FixtureType ) \
2131+ static void addTests( ::CppUT::Suite &suite, \
2132+ ::CppUT::TestCaseFactoryFn factory ) \
2133+ {
2134+
2135+
2136+// Internal
2137+// Part that is common to all derived fixture classes.
2138+// Chaine suite factory with parent class factory.
2139+# define _CPPUT_TESTSUITE_COMMON_EXTEND( FixtureType, ParentFixtureType ) \
2140+ ParentFixtureType :: addTests( suite, factory )
2141+
2142+
2143+// Internal
2144+// Part that is common to all base hierarchy fixture classes.
2145+// Run test based on content of member function pointer cpputRun_.
2146+# define _CPPUT_TESTSUITE_BASE_RUN( FixtureType ) \
2147+ /* overridden from CppUT::TestCase */ \
2148+ virtual void run() \
2149+ { \
2150+ (this->*cpputRun_)(); \
2151+ }
2152+
2153+
2154+// Internal
2155+// Part that is common to all derived fixture classes.
2156+// Run test based on content of member function pointer cpputRun_ if set,
2157+// otherwise forward run call to base class.
2158+# define _CPPUT_TESTSUITE_DERIVED_RUN( FixtureType, ParentFixtureType ) \
2159+ /* overridden from CppUT::TestCase */ \
2160+ virtual void run() \
2161+ { \
2162+ if ( cpputRun_ == 0 ) \
2163+ ParentFixtureType :: run(); \
2164+ else \
2165+ (this->*cpputRun_)(); \
2166+ }
2167+
2168+
2169+
2170+// //////////////////////////////////////////////////////////////////
2171+// //////////////////////////////////////////////////////////////////
2172+// Interface macros
2173+// //////////////////////////////////////////////////////////////////
2174+// //////////////////////////////////////////////////////////////////
2175+
2176+
2177+# define CPPUT_TESTSUITE_BEGIN( FixtureType ) \
2178+ _CPPUT_TESTSUITE_COMMON( FixtureType ) \
2179+ _CPPUT_TESTSUITE_BASE_RUN( FixtureType ) \
2180+ _CPPUT_TESTSUITE_COMMON_CONCRETE( FixtureType ) \
2181+
2182+# define CPPUT_TESTSUITE_ABSTRACT_BEGIN( FixtureType ) \
2183+ _CPPUT_TESTSUITE_COMMON( FixtureType ) \
2184+ _CPPUT_TESTSUITE_BASE_RUN( FixtureType ) \
2185+ _CPPUT_TESTSUITE_COMMON_ABSTRACT( FixtureType )
2186+
2187+# define CPPUT_TESTSUITE_ABSTRACT_EXTEND( FixtureType, ParentFixtureType ) \
2188+ _CPPUT_TESTSUITE_COMMON( FixtureType ) \
2189+ _CPPUT_TESTSUITE_DERIVED_RUN( FixtureType, ParentFixtureType ) \
2190+ _CPPUT_TESTSUITE_COMMON_ABSTRACT( FixtureType ) \
2191+ _CPPUT_TESTSUITE_COMMON_EXTEND( FixtureType, ParentFixtureType );
2192+
2193+# define CPPUT_TESTSUITE_EXTEND( FixtureType, ParentFixtureType ) \
2194+ _CPPUT_TESTSUITE_COMMON( FixtureType ) \
2195+ _CPPUT_TESTSUITE_DERIVED_RUN( FixtureType, ParentFixtureType ) \
2196+ _CPPUT_TESTSUITE_COMMON_CONCRETE( FixtureType ) \
2197+ _CPPUT_TESTSUITE_COMMON_EXTEND( FixtureType, ParentFixtureType );
2198+
2199+# define CPPUT_TESTSUITE_TEST( testMethod ) \
2200+ FixtureTestFactory::addTest( suite, factory, #testMethod, \
2201+ &CppUTSelfType :: testMethod )
2202+
2203+# define CPPUT_TESTSUITE_TEST_WITH_META( testMethod, theMetaData ) \
2204+ FixtureTestFactory::addTest( suite, factory, #testMethod, \
2205+ &CppUTSelfType :: testMethod, \
2206+ theMetaData )
2207+
2208+# define CPPUT_TESTSUITE_END() \
2209+ } \
2210+ private:
2211+
2212+#if 0
2213+
2214+
2215+/// @todo somehow hide this
2216+template<class FixtureType>
2217+class CallFixtureRunMethod
2218+{
2219+public:
2220+ typedef FixtureType *first_argument_type;
2221+ typedef void (FixtureType::*RunFn)();
2222+
2223+ static ::CppTL::Functor1<FixtureType *> make( RunFn run )
2224+ {
2225+ return ::CppTL::fn1( CallFixtureRunMethod( run ) );
2226+ }
2227+
2228+ explicit CallFixtureRunMethod( RunFn run )
2229+ : run_( run )
2230+ {
2231+ }
2232+
2233+ void operator()( FixtureType *fixture ) const
2234+ {
2235+ (fixture->*run_)();
2236+ }
2237+
2238+private:
2239+ RunFn run_;
2240+};
2241+
2242
2243 /*! \ingroup group_testfixture
2244 */
2245@@ -42,102 +246,6 @@
2246
2247
2248
2249-/// \cond implementation_detail
2250-namespace Impl {
2251-
2252- typedef CppTL::IntrusivePtr<TestFixture> TestFixturePtr;
2253-
2254- class CPPUT_API FixtureFactory
2255- {
2256- public:
2257- virtual ~FixtureFactory()
2258- {
2259- }
2260-
2261- TestFixturePtr operator()()
2262- {
2263- return createNewFixture();
2264- }
2265-
2266- private:
2267- virtual TestFixturePtr createNewFixture() =0;
2268- };
2269-
2270-
2271- template<typename FixtureType>
2272- class FixtureFactoryImpl : public FixtureFactory
2273- {
2274- public:
2275- TestFixturePtr createNewFixture()
2276- {
2277- return TestFixturePtr( new FixtureType() );
2278- }
2279- };
2280-
2281- template<typename FixtureType>
2282- class FixtureFactoryWrapper
2283- {
2284- public:
2285- FixtureFactoryWrapper( FixtureFactory &factory )
2286- : factory_( factory )
2287- {
2288- }
2289-
2290- CppTL::IntrusivePtr<FixtureType> operator()()
2291- {
2292- return ::CppTL::staticPointerCast<FixtureType>( factory_() );
2293- }
2294-
2295- private:
2296- FixtureFactory &factory_;
2297- };
2298-} // namespace Impl
2299-/// \endcond implementation_detail
2300-
2301-
2302-/* Code generated by the helper macros is roughly like this:
2303-
2304-class SomeTest : public CppUT::TestFixture
2305-{
2306-public: // CPPUT_TESTSUITE_BEGIN
2307- typedef FixtureType CppUT_ThisType;
2308-
2309- static std::string defaultSuiteName()
2310- {
2311- return ::CppTL::getTypeName<CppUT_ThisType>( #FixtureType );
2312- }
2313-
2314- void addTests_( const ::CppUT::TestSuitePtr &suite,
2315- ::CppUT::Impl::FixtureFactory &factory_ )
2316- {
2317- ::CppUT::Impl::FixtureFactoryWrapper<CppUT_ThisType> fixtureFactory( factory_ );
2318- ::CppTL::IntrusivePtr<FixtureType> fixture;
2319-
2320- // CPPUT_TESTSUITE_EXTEND (if defined)
2321- ParentFixtureType::addTests_( suite, factory_ );
2322-
2323- // CPPUT_TEST( testMethod )
2324- fixture = fixtureFactory();
2325- suite->add( ::CppUT::makeFixtureTestCase( fixture,
2326- &FixtureType::testMethod,
2327- #testMethod ) );
2328-
2329-
2330- } // if ended using CPPUT_ABSTRACT_TESTSUITE_END, stop there (suite() is not defined)
2331-
2332- // if ended using CPPUT_TESTSUITE_END, define the static function suite
2333- static ::CppUT::TestSuitePtr suite()
2334- {
2335- ::CppUT::TestSuitePtr testSuite( ::CppUT::makeTestSuite( defaultSuiteName() ) );
2336- ::CppUT::Impl::FixtureFactoryImpl<CppUT_ThisType> factory;
2337- addTests_( testSuite, factory );
2338- return testSuite;
2339- }
2340-};
2341-
2342-*/
2343-
2344-
2345
2346 # if CPPUT_USE_RTTI_TO_NAME_SUITE
2347 # define CPPUT_TESTSUITE_NAME_FROM_TYPE( FixtureType ) \
2348@@ -148,72 +256,19 @@
2349 # endif // if CPPUT_USE_RTTI_TO_NAME_SUITE
2350
2351
2352-
2353-/*! \ingroup group_testfixture
2354- */
2355-# define CPPUT_TESTSUITE_BEGIN( FixtureType ) \
2356-public: \
2357- typedef FixtureType CppUT_ThisType; \
2358- \
2359- static std::string defaultSuiteName() \
2360- { \
2361- return CPPUT_TESTSUITE_NAME_FROM_TYPE( FixtureType ); \
2362- } \
2363- \
2364- static void addTests_( const ::CppUT::TestSuitePtr &suite, \
2365- ::CppUT::Impl::FixtureFactory &factory_ ) \
2366- { \
2367- ::CppUT::Impl::FixtureFactoryWrapper<CppUT_ThisType> fixtureFactory( \
2368- factory_ ); \
2369- ::CppTL::IntrusivePtr<FixtureType> fixture
2370-
2371-/*! \ingroup group_testfixture
2372- */
2373-# define CPPUT_TESTSUITE_EXTEND( FixtureType, ParentFixtureType ) \
2374- CPPUT_TESTSUITE_BEGIN( FixtureType ); \
2375- ParentFixtureType::addTests_( suite, factory_ )
2376-
2377-/*! \ingroup group_testfixture
2378- */
2379-# define CPPUT_TESTSUITE_END() \
2380- } \
2381- \
2382- static ::CppUT::TestPtr suite( const std::string &name = std::string("") ) \
2383- { \
2384- std::string suiteName = name; \
2385- if ( suiteName.empty() ) \
2386- suiteName = defaultSuiteName(); \
2387- ::CppUT::TestSuitePtr testSuite = ::CppUT::makeTestSuite( suiteName ); \
2388- ::CppUT::Impl::FixtureFactoryImpl<CppUT_ThisType> factory; \
2389- addTests_( testSuite, factory ); \
2390- return ::CppTL::staticPointerCast< ::CppUT::Test >( testSuite ); \
2391- }
2392-
2393-/*! \ingroup group_testfixture
2394- */
2395-# define CPPUT_ABSTRACT_TESTSUITE_END() \
2396- }
2397-
2398-/*! \ingroup group_testfixture
2399- */
2400-# define CPPUT_TEST( testMethod ) \
2401- fixture = fixtureFactory(); \
2402- suite->add( ::CppUT::makeFixtureTestCase( fixture, \
2403- ::CppTL::memfn0( fixture, \
2404- &CppUT_ThisType::testMethod ), \
2405- #testMethod ) )
2406-
2407-/*! \ingroup group_testfixture
2408- */
2409-# define CPPUT_TEST_WITH_SPECIFICS( testMethod, specifics ) \
2410+/*! \ingroup group_testfixture
2411+ */
2412+# define CPPUT_TESTSUITE_TEST_WITH_SPECIFICS( testMethod, specifics ) \
2413 fixture = fixtureFactory(); \
2414 addTestWithSpecifics( *suite, \
2415- ::CppUT::makeFixtureTestCase( fixture, \
2416- ::CppTL::memfn0( fixture, \
2417- &CppUT_ThisType::testMethod ), \
2418- #testMethod ), \
2419+ ::CppUT::makeFixtureTestCase( ::CppTL::Type<CppUT_ThisType>(), \
2420+ ::CppUT::CallFixtureRunMethod<CppUT_ThisType>::make( \
2421+ &CppUT_ThisType::testMethod ), \
2422+ #testMethod ), \
2423 specifics )
2424-
2425+
2426+#endif
2427+
2428 } // namespace CppUT
2429
2430
2431
2432=== modified file 'cppunit2/include/cpput/testfunction.h'
2433--- cppunit2/include/cpput/testfunction.h 2007-08-15 15:48:29 +0000
2434+++ cppunit2/include/cpput/testfunction.h 2008-12-29 20:51:19 +0000
2435@@ -9,30 +9,31 @@
2436
2437 namespace CppUT
2438 {
2439- class TestFunctionFactory
2440- {
2441- public:
2442- typedef TestPtr result_type; // Functor return type
2443-
2444- typedef void (*TestFn)();
2445-
2446- TestFunctionFactory( TestFn test, const char *name )
2447- : test_( test )
2448- , name_( name )
2449- {
2450- }
2451-
2452- TestPtr operator()() const
2453- {
2454- return makeTestCase( test_, name_ );
2455- }
2456-
2457- TestFn test_;
2458- const char *name_;
2459- };
2460+ /// @todo move it to .cpp
2461+ inline TestMeta
2462+ declareTestCaseFunction( void (*run)(),
2463+ const char *name,
2464+ Suite &parentSuite )
2465+ {
2466+ TestMeta test = makeTestCase( run, name );
2467+ parentSuite.add( test );
2468+ return test;
2469+ }
2470+
2471+ /// @todo move it to .cpp
2472+ inline TestMeta
2473+ declareTestCaseFunction( void (*run)(),
2474+ const MetaData &metaData,
2475+ Suite &parentSuite )
2476+ {
2477+ TestMeta test = makeTestCase( run, metaData );
2478+ parentSuite.add( test );
2479+ return test;
2480+ }
2481+
2482 } // end namespace CppUT
2483
2484-/*! \brief Make the specified C function a test case and register it in the default Registry suite.
2485+/*! \brief Make the specified C function a test case and register it in the current suite.
2486 * \code
2487 * static void myTest1() {
2488 * CPPUT_ASSERT_TRUE( false );
2489@@ -40,55 +41,58 @@
2490 * CPPUT_REGISTER_TEST_FUNCTION( myTest1 );
2491 * \endcode
2492 */
2493-#define CPPUT_REGISTER_TEST_FUNCTION( testFunction ) \
2494- CPPUT_REGISTER_TESTFACTORY_TO_DEFAULT( \
2495- ::CppTL::fn0r( ::CppUT::TestFunctionFactory( &testFunction, #testFunction ) ) )
2496-
2497-/*! \brief Make the specified C function a test case and register it in the specified Registry suite.
2498- * \code
2499- * static void myTest1() {
2500- * CPPUT_ASSERT_TRUE( false );
2501- * }
2502- * CPPUT_REGISTER_TEST_FUNCTION_IN( myTest1, "BoolTest" );
2503- * \endcode
2504- */
2505-#define CPPUT_REGISTER_TEST_FUNCTION_IN( testFunction, parentSuiteName ) \
2506- CPPUT_REGISTER_TESTFACTORY_IN( \
2507- ::CppTL::fn0r( ::CppUT::TestFunctionFactory( &testFunction, #testFunction )), \
2508- parentSuiteName )
2509-
2510-/*! \brief Declare and register a simple test case in the default Registry suite.
2511- * The function is declared as a static void testFunction().
2512- * \code
2513- * CPPUT_TEST_FUNCTION( myTest1 ) {
2514- * CPPUT_ASSERT_TRUE( false );
2515- * }
2516- * \endcode
2517- */
2518-#define CPPUT_TEST_FUNCTION( testFunctionName ) \
2519- static void testFunctionName(); \
2520- CPPUT_REGISTER_TEST_FUNCTION( testFunctionName ); \
2521- static void testFunctionName()
2522-
2523-/*! \brief Declare and register a simple test case in the specified Registry suite.
2524- * The function is declared as a static void testFunction().
2525- * \code
2526- * CPPUT_TEST_FUNCTION_IN( myTest1, "BoolTests" ) {
2527- * CPPUT_ASSERT_TRUE( false );
2528- * }
2529- * \endcode
2530- */
2531-#define CPPUT_TEST_FUNCTION_IN( testFunctionName, parentSuiteName ) \
2532- static void testFunctionName(); \
2533- CPPUT_REGISTER_TEST_FUNCTION_IN( testFunctionName, parentSuiteName ); \
2534- static void testFunctionName()
2535-
2536-/* @todo support for extended test data
2537-CPPUT_REGISTER_TEST_FUNCTION_IN_DEFAULT_WITH_SPECIFICS(
2538- myTest,
2539- (timeOut(0.2),
2540- describe("Always fails")) )
2541-*/
2542+#define _CPPUT_REGISTER_TEST_FUNCTION( testFunction ) \
2543+ static ::CppUT::TestMeta \
2544+ CPPTL_MAKE_UNIQUE_NAME( cpputmeta ## testFunctionName ) = \
2545+ ::CppUT::declareTestCaseFunction( &testFunction, \
2546+ #testFunction, \
2547+ CPPUT_CURRENT_SUITE() )
2548+
2549+#define _CPPUT_REGISTER_TEST_FUNCTION_WITH_META( testFunction, metaData ) \
2550+ static ::CppUT::TestMeta \
2551+ CPPTL_MAKE_UNIQUE_NAME( cpputmeta ## testFunctionName ) = \
2552+ ::CppUT::declareTestCaseFunction( &testFunction, \
2553+ metaData, \
2554+ CPPUT_CURRENT_SUITE() )
2555+
2556+
2557+/*! \brief Declare and register a simple test case in the current suite.
2558+ * The function is declared as a static void testFunction().
2559+ * \code
2560+ * CPPUT_TEST_FUNCTION( myTest1 ) {
2561+ * CPPUT_ASSERT_TRUE( false );
2562+ * }
2563+ * \endcode
2564+ */
2565+#define CPPUT_TEST_FUNCTION( testFunctionName ) \
2566+ static void testFunctionName(); \
2567+ _CPPUT_REGISTER_TEST_FUNCTION( testFunctionName ); \
2568+ static void testFunctionName()
2569+
2570+/*! \brief Declare and register a simple test case in the current suite.
2571+ * The function is declared as a static void testFunction().
2572+ * \code
2573+ * CPPUT_TEST_FUNCTION( myTest1 ) {
2574+ * CPPUT_ASSERT_TRUE( false );
2575+ * }
2576+ * \endcode
2577+ */
2578+#define CPPUT_TEST_FUNCTION_WITH_META( testFunctionName, metaData ) \
2579+ namespace { \
2580+ class CppUT##testFunctionName##Meta : public ::CppUT::TestExtendedDataFactory \
2581+ { \
2582+ public: \
2583+ static ::CppUT::MetaData cppUTRegisterTestCase() \
2584+ { \
2585+ return ::CppUT::MetaData( #testFunctionName, metaData ); \
2586+ } \
2587+ }; \
2588+ } \
2589+ static void testFunctionName(); \
2590+ _CPPUT_REGISTER_TEST_FUNCTION_WITH_META( testFunctionName, \
2591+ CppUT##testFunctionName##Meta::cppUTRegisterTestCase() ); \
2592+ static void testFunctionName()
2593+
2594
2595
2596 #endif // CPPUT_TESTFUNCTION_H_INCLUDED
2597
2598=== modified file 'cppunit2/include/cpput/testinfo.h'
2599--- cppunit2/include/cpput/testinfo.h 2008-07-13 06:19:20 +0000
2600+++ cppunit2/include/cpput/testinfo.h 2008-12-13 10:11:21 +0000
2601@@ -303,7 +303,7 @@
2602 * For simplicity, we will use the following compact form for reference :
2603 * x += f + l / checkCond( condition );
2604 * checkCond must returns an CheckerResult which as overloaded operator /.
2605- * operator = evaluate right to left
2606+ * operator += evaluate right to left
2607 * operator + evaluate left to right
2608 * operator / evaluate left to right and as priority over +.
2609 * So 'condition expression' is evaluted first, then checkCond(condition) is evaluated.
2610@@ -428,7 +428,7 @@
2611 * \param name Name of the resource to obtains. This resource must have been
2612 * declared in the list of resource required by the test case.
2613 * \warning This function may only be called inside a test case (setUp, run or tearDown).
2614- * \see AbstractTestCase::requireResource, ResourceHandlerRegistry.
2615+ * \see TestCase::requireResource, ResourceHandlerRegistry.
2616 */
2617 Resource &getResource( const ResourceName &name );
2618
2619@@ -460,7 +460,7 @@
2620 * \param name Name of the resource to obtains. This resource must have been
2621 * declared in the list of resource required by the test case.
2622 * \warning This function may only be called inside a test case (setUp, run or tearDown).
2623- * \see AbstractTestCase::requireResource, ResourceHandlerRegistry.
2624+ * \see TestCase::requireResource, ResourceHandlerRegistry.
2625 */
2626 Resource &CPPUT_API getResource( const ResourceName &name );
2627
2628
2629=== removed file 'cppunit2/include/cpput/testsuite.h'
2630--- cppunit2/include/cpput/testsuite.h 2006-06-05 10:02:56 +0000
2631+++ cppunit2/include/cpput/testsuite.h 1970-01-01 00:00:00 +0000
2632@@ -1,64 +0,0 @@
2633-#ifndef CPPUT_TESTSUITE_H_INCLUDED
2634-# define CPPUT_TESTSUITE_H_INCLUDED
2635-
2636-# include <cpput/test.h>
2637-# include <deque>
2638-
2639-
2640-namespace CppUT {
2641-
2642-/*! \brief An abstract test suite that represents a collection of Test.
2643- * \ingroup group_testcases
2644- */
2645-class CPPUT_API AbstractTestSuite : public Test
2646-{
2647-public:
2648- AbstractTestSuite();
2649-
2650- AbstractTestSuite( const std::string &name );
2651-
2652- virtual int testCount() const = 0;
2653-
2654- virtual TestPtr testAt( int index ) const = 0;
2655-
2656-public: // overridden from Test
2657- void accept( TestVisitor &visitor );
2658-
2659- /// Returns \c true if the class is derived from AbstractTestCase.
2660- bool isTestCase() const;
2661-};
2662-
2663-
2664-/*! \brief A test suite that represents a collection of Test.
2665- * \ingroup group_testcases
2666- */
2667-class CPPUT_API TestSuite : public AbstractTestSuite
2668-{
2669-public:
2670- TestSuite( const std::string &name );
2671-
2672- void add( const TestPtr &test );
2673-
2674- void add( const TestSuitePtr &test );
2675-
2676-// overridden from AbstractTestSuite
2677- int testCount() const;
2678-
2679- TestPtr testAt( int index ) const;
2680-
2681-private:
2682- typedef std::deque<TestPtr> Tests;
2683- Tests tests_;
2684-};
2685-
2686-
2687-/*! \brief Creates a TestSuite with the specified name.
2688- * \ingroup group_testcases
2689- */
2690-TestSuitePtr CPPUT_API makeTestSuite( const std::string &name );
2691-
2692-} // namespace CppUT
2693-
2694-
2695-
2696-#endif // CPPUT_TESTSUITE_H_INCLUDED
2697
2698=== removed file 'cppunit2/include/cpput/testvisitor.h'
2699--- cppunit2/include/cpput/testvisitor.h 2005-09-06 05:14:49 +0000
2700+++ cppunit2/include/cpput/testvisitor.h 1970-01-01 00:00:00 +0000
2701@@ -1,26 +0,0 @@
2702-#ifndef CPPUT_TESTVISITOR_H_INCLUDED
2703-# define CPPUT_TESTVISITOR_H_INCLUDED
2704-
2705-# include <cpput/config.h>
2706-# include <cpput/forwards.h>
2707-
2708-namespace CppUT {
2709-
2710-class CPPUT_API TestVisitor
2711-{
2712-public:
2713- virtual ~TestVisitor()
2714- {
2715- }
2716-
2717- virtual void visitTestCase( AbstractTestCase &test ) = 0;
2718-
2719- virtual void visitTestSuite( AbstractTestSuite &suite ) = 0;
2720-};
2721-
2722-
2723-} // namespace CppUT
2724-
2725-
2726-
2727-#endif // CPPUT_TESTVISITOR_H_INCLUDED
2728
2729=== added directory 'cppunit2/makefiles/vs6'
2730=== added file 'cppunit2/makefiles/vs6/cpput_lib.dsp'
2731--- cppunit2/makefiles/vs6/cpput_lib.dsp 1970-01-01 00:00:00 +0000
2732+++ cppunit2/makefiles/vs6/cpput_lib.dsp 2009-03-13 21:31:02 +0000
2733@@ -0,0 +1,360 @@
2734+# Microsoft Developer Studio Project File - Name="cpput_lib" - Package Owner=<4>
2735+# Microsoft Developer Studio Generated Build File, Format Version 6.00
2736+# ** DO NOT EDIT **
2737+
2738+# TARGTYPE "Win32 (x86) Static Library" 0x0104
2739+
2740+CFG=cpput_lib - Win32 Debug
2741+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
2742+!MESSAGE use the Export Makefile command and run
2743+!MESSAGE
2744+!MESSAGE NMAKE /f "cpput_lib.mak".
2745+!MESSAGE
2746+!MESSAGE You can specify a configuration when running NMAKE
2747+!MESSAGE by defining the macro CFG on the command line. For example:
2748+!MESSAGE
2749+!MESSAGE NMAKE /f "cpput_lib.mak" CFG="cpput_lib - Win32 Debug"
2750+!MESSAGE
2751+!MESSAGE Possible choices for configuration are:
2752+!MESSAGE
2753+!MESSAGE "cpput_lib - Win32 Release" (based on "Win32 (x86) Static Library")
2754+!MESSAGE "cpput_lib - Win32 Debug" (based on "Win32 (x86) Static Library")
2755+!MESSAGE
2756+
2757+# Begin Project
2758+# PROP AllowPerConfigDependencies 0
2759+# PROP Scc_ProjName ""
2760+# PROP Scc_LocalPath ""
2761+CPP=cl.exe
2762+RSC=rc.exe
2763+
2764+!IF "$(CFG)" == "cpput_lib - Win32 Release"
2765+
2766+# PROP BASE Use_MFC 0
2767+# PROP BASE Use_Debug_Libraries 0
2768+# PROP BASE Output_Dir "Release"
2769+# PROP BASE Intermediate_Dir "Release"
2770+# PROP BASE Target_Dir ""
2771+# PROP Use_MFC 0
2772+# PROP Use_Debug_Libraries 0
2773+# PROP Output_Dir "../../build/msvc6/cpput_lib/Release"
2774+# PROP Intermediate_Dir "../../build/msvc6/cpput_lib/Release"
2775+# PROP Target_Dir ""
2776+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
2777+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
2778+# ADD BASE RSC /l 0x40c /d "NDEBUG"
2779+# ADD RSC /l 0x40c /d "NDEBUG"
2780+BSC32=bscmake.exe
2781+# ADD BASE BSC32 /nologo
2782+# ADD BSC32 /nologo
2783+LIB32=link.exe -lib
2784+# ADD BASE LIB32 /nologo
2785+# ADD LIB32 /nologo
2786+
2787+!ELSEIF "$(CFG)" == "cpput_lib - Win32 Debug"
2788+
2789+# PROP BASE Use_MFC 0
2790+# PROP BASE Use_Debug_Libraries 1
2791+# PROP BASE Output_Dir "Debug"
2792+# PROP BASE Intermediate_Dir "Debug"
2793+# PROP BASE Target_Dir ""
2794+# PROP Use_MFC 0
2795+# PROP Use_Debug_Libraries 1
2796+# PROP Output_Dir "../../build/msvc6/cpput_lib/Debug"
2797+# PROP Intermediate_Dir "../../build/msvc6/cpput_lib/Debug"
2798+# PROP Target_Dir ""
2799+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
2800+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
2801+# ADD BASE RSC /l 0x40c /d "_DEBUG"
2802+# ADD RSC /l 0x40c /d "_DEBUG"
2803+BSC32=bscmake.exe
2804+# ADD BASE BSC32 /nologo
2805+# ADD BSC32 /nologo
2806+LIB32=link.exe -lib
2807+# ADD BASE LIB32 /nologo
2808+# ADD LIB32 /nologo
2809+
2810+!ENDIF
2811+
2812+# Begin Target
2813+
2814+# Name "cpput_lib - Win32 Release"
2815+# Name "cpput_lib - Win32 Debug"
2816+# Begin Group "cpptl"
2817+
2818+# PROP Default_Filter ""
2819+# Begin Source File
2820+
2821+SOURCE=..\..\include\cpptl\_stlimpl.h
2822+# End Source File
2823+# Begin Source File
2824+
2825+SOURCE=..\..\include\cpptl\any.h
2826+# End Source File
2827+# Begin Source File
2828+
2829+SOURCE=..\..\include\cpptl\atomiccounter.h
2830+# End Source File
2831+# Begin Source File
2832+
2833+SOURCE=..\..\include\cpptl\autolink.h
2834+# End Source File
2835+# Begin Source File
2836+
2837+SOURCE=..\..\include\cpptl\config.h
2838+# End Source File
2839+# Begin Source File
2840+
2841+SOURCE=..\..\include\cpptl\conststring.h
2842+# End Source File
2843+# Begin Source File
2844+
2845+SOURCE=..\..\include\cpptl\cpptl_autolink.h
2846+# End Source File
2847+# Begin Source File
2848+
2849+SOURCE=..\..\include\cpptl\enumerator.h
2850+# End Source File
2851+# Begin Source File
2852+
2853+SOURCE=..\..\include\cpptl\format.h
2854+# End Source File
2855+# Begin Source File
2856+
2857+SOURCE=..\..\include\cpptl\forwards.h
2858+# End Source File
2859+# Begin Source File
2860+
2861+SOURCE=..\..\include\cpptl\functor.h
2862+# End Source File
2863+# Begin Source File
2864+
2865+SOURCE=..\..\include\cpptl\intrusiveptr.h
2866+# End Source File
2867+# Begin Source File
2868+
2869+SOURCE=..\..\src\cpptl\json_reader.cpp
2870+# End Source File
2871+# Begin Source File
2872+
2873+SOURCE=..\..\src\cpptl\json_value.cpp
2874+# End Source File
2875+# Begin Source File
2876+
2877+SOURCE=..\..\src\cpptl\json_valueiterator.inl
2878+# End Source File
2879+# Begin Source File
2880+
2881+SOURCE=..\..\src\cpptl\json_writer.cpp
2882+# End Source File
2883+# Begin Source File
2884+
2885+SOURCE=..\..\include\cpptl\reflection.h
2886+# End Source File
2887+# Begin Source File
2888+
2889+SOURCE=..\..\include\cpptl\reflection.inl
2890+# End Source File
2891+# Begin Source File
2892+
2893+SOURCE=..\..\include\cpptl\reflectionimpl10.h
2894+# End Source File
2895+# Begin Source File
2896+
2897+SOURCE=..\..\include\cpptl\scopedptr.h
2898+# End Source File
2899+# Begin Source File
2900+
2901+SOURCE=..\..\include\cpptl\sharedptr.h
2902+# End Source File
2903+# Begin Source File
2904+
2905+SOURCE=..\..\include\cpptl\smallmap.h
2906+# End Source File
2907+# Begin Source File
2908+
2909+SOURCE=..\..\include\cpptl\stringtools.h
2910+# End Source File
2911+# Begin Source File
2912+
2913+SOURCE=..\..\src\cpptl\thread.cpp
2914+# End Source File
2915+# Begin Source File
2916+
2917+SOURCE=..\..\include\cpptl\thread.h
2918+# End Source File
2919+# Begin Source File
2920+
2921+SOURCE=..\..\include\cpptl\thread.inl
2922+# End Source File
2923+# Begin Source File
2924+
2925+SOURCE=..\..\include\cpptl\typeinfo.h
2926+# End Source File
2927+# Begin Source File
2928+
2929+SOURCE=..\..\include\cpptl\typename.h
2930+# End Source File
2931+# Begin Source File
2932+
2933+SOURCE=..\..\include\cpptl\typetraits.h
2934+# End Source File
2935+# Begin Source File
2936+
2937+SOURCE=..\..\include\cpptl\value.h
2938+# End Source File
2939+# End Group
2940+# Begin Group "cpput"
2941+
2942+# PROP Default_Filter ""
2943+# Begin Source File
2944+
2945+SOURCE=..\..\src\cpput\assert.cpp
2946+# End Source File
2947+# Begin Source File
2948+
2949+SOURCE=..\..\include\cpput\assertcommon.h
2950+# End Source File
2951+# Begin Source File
2952+
2953+SOURCE=..\..\include\cpput\assertenum.h
2954+# End Source File
2955+# Begin Source File
2956+
2957+SOURCE=..\..\src\cpput\assertstring.cpp
2958+# End Source File
2959+# Begin Source File
2960+
2961+SOURCE=..\..\include\cpput\assertstring.h
2962+# End Source File
2963+# Begin Source File
2964+
2965+SOURCE=..\..\include\cpput\autolink.h
2966+# End Source File
2967+# Begin Source File
2968+
2969+SOURCE=..\..\include\cpput\config.h
2970+# End Source File
2971+# Begin Source File
2972+
2973+SOURCE=..\..\src\cpput\dllproxy.cpp
2974+# End Source File
2975+# Begin Source File
2976+
2977+SOURCE=..\..\include\cpput\dllproxy.h
2978+# End Source File
2979+# Begin Source File
2980+
2981+SOURCE=..\..\include\cpput\equality.h
2982+# End Source File
2983+# Begin Source File
2984+
2985+SOURCE=..\..\src\cpput\exceptionguard.cpp
2986+# End Source File
2987+# Begin Source File
2988+
2989+SOURCE=..\..\include\cpput\exceptionguard.h
2990+# End Source File
2991+# Begin Source File
2992+
2993+SOURCE=..\..\src\cpput\extendeddata.cpp
2994+# End Source File
2995+# Begin Source File
2996+
2997+SOURCE=..\..\include\cpput\extendeddata.h
2998+# End Source File
2999+# Begin Source File
3000+
3001+SOURCE=..\..\include\cpput\forwards.h
3002+# End Source File
3003+# Begin Source File
3004+
3005+SOURCE=..\..\include\cpput\inputbasedtest.h
3006+# End Source File
3007+# Begin Source File
3008+
3009+SOURCE=..\..\include\cpput\interface.h
3010+# End Source File
3011+# Begin Source File
3012+
3013+SOURCE=..\..\include\cpput\lightfixture.h
3014+# End Source File
3015+# Begin Source File
3016+
3017+SOURCE=..\..\src\cpput\lighttestrunner.cpp
3018+# End Source File
3019+# Begin Source File
3020+
3021+SOURCE=..\..\include\cpput\lighttestrunner.h
3022+# End Source File
3023+# Begin Source File
3024+
3025+SOURCE=..\..\src\cpput\message.cpp
3026+# End Source File
3027+# Begin Source File
3028+
3029+SOURCE=..\..\include\cpput\message.h
3030+# End Source File
3031+# Begin Source File
3032+
3033+SOURCE=..\..\include\cpput\opentestadaptor.h
3034+# End Source File
3035+# Begin Source File
3036+
3037+SOURCE=..\..\src\cpput\registry.cpp
3038+# End Source File
3039+# Begin Source File
3040+
3041+SOURCE=..\..\include\cpput\registry.h
3042+# End Source File
3043+# Begin Source File
3044+
3045+SOURCE=..\..\src\cpput\resource.cpp
3046+# End Source File
3047+# Begin Source File
3048+
3049+SOURCE=..\..\include\cpput\resource.h
3050+# End Source File
3051+# Begin Source File
3052+
3053+SOURCE=..\..\include\cpput\stringize.h
3054+# End Source File
3055+# Begin Source File
3056+
3057+SOURCE=..\..\include\cpput\tablefixture.h
3058+# End Source File
3059+# Begin Source File
3060+
3061+SOURCE=..\..\include\cpput\test.h
3062+# End Source File
3063+# Begin Source File
3064+
3065+SOURCE=..\..\src\cpput\testcase.cpp
3066+# End Source File
3067+# Begin Source File
3068+
3069+SOURCE=..\..\include\cpput\testcase.h
3070+# End Source File
3071+# Begin Source File
3072+
3073+SOURCE=..\..\include\cpput\testfixture.h
3074+# End Source File
3075+# Begin Source File
3076+
3077+SOURCE=..\..\include\cpput\testfunction.h
3078+# End Source File
3079+# Begin Source File
3080+
3081+SOURCE=..\..\src\cpput\testinfo.cpp
3082+# End Source File
3083+# Begin Source File
3084+
3085+SOURCE=..\..\include\cpput\testinfo.h
3086+# End Source File
3087+# Begin Source File
3088+
3089+SOURCE=..\..\include\cpput\translate.h
3090+# End Source File
3091+# End Group
3092+# End Target
3093+# End Project
3094
3095=== added file 'cppunit2/makefiles/vs6/cpput_lib.dsw'
3096--- cppunit2/makefiles/vs6/cpput_lib.dsw 1970-01-01 00:00:00 +0000
3097+++ cppunit2/makefiles/vs6/cpput_lib.dsw 2009-03-13 21:31:02 +0000
3098@@ -0,0 +1,44 @@
3099+Microsoft Developer Studio Workspace File, Format Version 6.00
3100+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3101+
3102+###############################################################################
3103+
3104+Project: "cpput_lib"=".\cpput_lib.dsp" - Package Owner=<4>
3105+
3106+Package=<5>
3107+{{{
3108+}}}
3109+
3110+Package=<4>
3111+{{{
3112+}}}
3113+
3114+###############################################################################
3115+
3116+Project: "cpput_test"=".\cpput_test.dsp" - Package Owner=<4>
3117+
3118+Package=<5>
3119+{{{
3120+}}}
3121+
3122+Package=<4>
3123+{{{
3124+ Begin Project Dependency
3125+ Project_Dep_Name cpput_lib
3126+ End Project Dependency
3127+}}}
3128+
3129+###############################################################################
3130+
3131+Global:
3132+
3133+Package=<5>
3134+{{{
3135+}}}
3136+
3137+Package=<3>
3138+{{{
3139+}}}
3140+
3141+###############################################################################
3142+
3143
3144=== added file 'cppunit2/makefiles/vs6/cpput_test.dsp'
3145--- cppunit2/makefiles/vs6/cpput_test.dsp 1970-01-01 00:00:00 +0000
3146+++ cppunit2/makefiles/vs6/cpput_test.dsp 2009-03-13 21:31:02 +0000
3147@@ -0,0 +1,178 @@
3148+# Microsoft Developer Studio Project File - Name="cpput_test" - Package Owner=<4>
3149+# Microsoft Developer Studio Generated Build File, Format Version 6.00
3150+# ** DO NOT EDIT **
3151+
3152+# TARGTYPE "Win32 (x86) Console Application" 0x0103
3153+
3154+CFG=cpput_test - Win32 Debug
3155+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
3156+!MESSAGE use the Export Makefile command and run
3157+!MESSAGE
3158+!MESSAGE NMAKE /f "cpput_test.mak".
3159+!MESSAGE
3160+!MESSAGE You can specify a configuration when running NMAKE
3161+!MESSAGE by defining the macro CFG on the command line. For example:
3162+!MESSAGE
3163+!MESSAGE NMAKE /f "cpput_test.mak" CFG="cpput_test - Win32 Debug"
3164+!MESSAGE
3165+!MESSAGE Possible choices for configuration are:
3166+!MESSAGE
3167+!MESSAGE "cpput_test - Win32 Release" (based on "Win32 (x86) Console Application")
3168+!MESSAGE "cpput_test - Win32 Debug" (based on "Win32 (x86) Console Application")
3169+!MESSAGE
3170+
3171+# Begin Project
3172+# PROP AllowPerConfigDependencies 0
3173+# PROP Scc_ProjName ""
3174+# PROP Scc_LocalPath ""
3175+CPP=cl.exe
3176+RSC=rc.exe
3177+
3178+!IF "$(CFG)" == "cpput_test - Win32 Release"
3179+
3180+# PROP BASE Use_MFC 0
3181+# PROP BASE Use_Debug_Libraries 0
3182+# PROP BASE Output_Dir "Release"
3183+# PROP BASE Intermediate_Dir "Release"
3184+# PROP BASE Target_Dir ""
3185+# PROP Use_MFC 0
3186+# PROP Use_Debug_Libraries 0
3187+# PROP Output_Dir "../../build/msvc6/cpput_lib/Release"
3188+# PROP Intermediate_Dir "../../build/msvc6/cpput_lib/Release"
3189+# PROP Ignore_Export_Lib 0
3190+# PROP Target_Dir ""
3191+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
3192+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
3193+# ADD BASE RSC /l 0x40c /d "NDEBUG"
3194+# ADD RSC /l 0x40c /d "NDEBUG"
3195+BSC32=bscmake.exe
3196+# ADD BASE BSC32 /nologo
3197+# ADD BSC32 /nologo
3198+LINK32=link.exe
3199+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
3200+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /map /debug /debugtype:both /machine:I386
3201+# SUBTRACT LINK32 /pdbtype:<none>
3202+
3203+!ELSEIF "$(CFG)" == "cpput_test - Win32 Debug"
3204+
3205+# PROP BASE Use_MFC 0
3206+# PROP BASE Use_Debug_Libraries 1
3207+# PROP BASE Output_Dir "Debug"
3208+# PROP BASE Intermediate_Dir "Debug"
3209+# PROP BASE Target_Dir ""
3210+# PROP Use_MFC 0
3211+# PROP Use_Debug_Libraries 1
3212+# PROP Output_Dir "../../build/msvc6/cpput_lib/Debug"
3213+# PROP Intermediate_Dir "../../build/msvc6/cpput_lib/Debug"
3214+# PROP Target_Dir ""
3215+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
3216+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
3217+# ADD BASE RSC /l 0x40c /d "_DEBUG"
3218+# ADD RSC /l 0x40c /d "_DEBUG"
3219+BSC32=bscmake.exe
3220+# ADD BASE BSC32 /nologo
3221+# ADD BSC32 /nologo
3222+LINK32=link.exe
3223+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
3224+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
3225+
3226+!ENDIF
3227+
3228+# Begin Target
3229+
3230+# Name "cpput_test - Win32 Release"
3231+# Name "cpput_test - Win32 Debug"
3232+# Begin Source File
3233+
3234+SOURCE=..\..\src\cpputtest\assertenumtest.cpp
3235+# End Source File
3236+# Begin Source File
3237+
3238+SOURCE=..\..\src\cpputtest\assertenumtest.h
3239+# End Source File
3240+# Begin Source File
3241+
3242+SOURCE=..\..\src\cpputtest\assertstringtest.cpp
3243+# End Source File
3244+# Begin Source File
3245+
3246+SOURCE=..\..\src\cpputtest\enumeratortest.cpp
3247+# End Source File
3248+# Begin Source File
3249+
3250+SOURCE=..\..\src\cpputtest\enumeratortest.h
3251+# End Source File
3252+# Begin Source File
3253+
3254+SOURCE=..\..\src\cpputtest\main.cpp
3255+# End Source File
3256+# Begin Source File
3257+
3258+SOURCE=..\..\src\cpputtest\minitestrunner.h
3259+# End Source File
3260+# Begin Source File
3261+
3262+SOURCE=..\..\src\cpputtest\mocktestlistener.h
3263+# End Source File
3264+# Begin Source File
3265+
3266+SOURCE=..\..\src\cpputtest\reflectiontest.cpp
3267+# End Source File
3268+# Begin Source File
3269+
3270+SOURCE=..\..\src\cpputtest\reflectiontest.h
3271+# End Source File
3272+# Begin Source File
3273+
3274+SOURCE=..\..\src\cpputtest\registrytest.cpp
3275+# End Source File
3276+# Begin Source File
3277+
3278+SOURCE=..\..\src\cpputtest\registrytest.h
3279+# End Source File
3280+# Begin Source File
3281+
3282+SOURCE=..\..\src\cpputtest\smallmaptest.cpp
3283+# End Source File
3284+# Begin Source File
3285+
3286+SOURCE=..\..\src\cpputtest\smallmaptest.h
3287+# End Source File
3288+# Begin Source File
3289+
3290+SOURCE=..\..\src\cpputtest\testbasicassertion.cpp
3291+# End Source File
3292+# Begin Source File
3293+
3294+SOURCE=..\..\src\cpputtest\testexceptionguard.cpp
3295+# End Source File
3296+# Begin Source File
3297+
3298+SOURCE=..\..\src\cpputtest\testfixturetest.cpp
3299+# End Source File
3300+# Begin Source File
3301+
3302+SOURCE=..\..\src\cpputtest\testfunctor.cpp
3303+# End Source File
3304+# Begin Source File
3305+
3306+SOURCE=..\..\src\cpputtest\testinfotest.cpp
3307+# End Source File
3308+# Begin Source File
3309+
3310+SOURCE=..\..\src\cpputtest\testing.h
3311+# End Source File
3312+# Begin Source File
3313+
3314+SOURCE=..\..\src\cpputtest\testtestcase.cpp
3315+# End Source File
3316+# Begin Source File
3317+
3318+SOURCE=..\..\src\cpputtest\valuetest.cpp
3319+# End Source File
3320+# Begin Source File
3321+
3322+SOURCE=..\..\src\cpputtest\valuetest.h
3323+# End Source File
3324+# End Target
3325+# End Project
3326
3327=== modified file 'cppunit2/makefiles/vs71/cppunit2.suo'
3328Binary files cppunit2/makefiles/vs71/cppunit2.suo 2005-09-06 05:35:12 +0000 and cppunit2/makefiles/vs71/cppunit2.suo 2008-12-29 20:49:53 +0000 differ
3329=== modified file 'cppunit2/makefiles/vs71/cpput_lib.vcproj'
3330--- cppunit2/makefiles/vs71/cpput_lib.vcproj 2007-08-14 15:30:52 +0000
3331+++ cppunit2/makefiles/vs71/cpput_lib.vcproj 2008-12-29 20:49:53 +0000
3332@@ -1,281 +1,305 @@
3333-<?xml version="1.0" encoding="Windows-1252"?>
3334-<VisualStudioProject
3335- ProjectType="Visual C++"
3336- Version="7.10"
3337- Name="cpput_lib"
3338- ProjectGUID="{79273A0D-700E-4AFA-B7F2-14D4CC325521}"
3339- Keyword="Win32Proj">
3340- <Platforms>
3341- <Platform
3342- Name="Win32"/>
3343- </Platforms>
3344- <Configurations>
3345- <Configuration
3346- Name="Debug|Win32"
3347- OutputDirectory="../../build/cpput/debug"
3348- IntermediateDirectory="../../build/cpput/debug"
3349- ConfigurationType="4"
3350- CharacterSet="2">
3351- <Tool
3352- Name="VCCLCompilerTool"
3353- Optimization="0"
3354- AdditionalIncludeDirectories="../../include"
3355- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
3356- MinimalRebuild="TRUE"
3357- BasicRuntimeChecks="3"
3358- RuntimeLibrary="3"
3359- BufferSecurityCheck="TRUE"
3360- TreatWChar_tAsBuiltInType="TRUE"
3361- ForceConformanceInForLoopScope="TRUE"
3362- UsePrecompiledHeader="0"
3363- WarningLevel="3"
3364- Detect64BitPortabilityProblems="FALSE"
3365- DebugInformationFormat="3"/>
3366- <Tool
3367- Name="VCCustomBuildTool"/>
3368- <Tool
3369- Name="VCLibrarianTool"
3370- OutputFile="$(OutDir)/cpput_vc71_libmd.lib"/>
3371- <Tool
3372- Name="VCMIDLTool"/>
3373- <Tool
3374- Name="VCPostBuildEventTool"/>
3375- <Tool
3376- Name="VCPreBuildEventTool"/>
3377- <Tool
3378- Name="VCPreLinkEventTool"/>
3379- <Tool
3380- Name="VCResourceCompilerTool"/>
3381- <Tool
3382- Name="VCWebServiceProxyGeneratorTool"/>
3383- <Tool
3384- Name="VCXMLDataGeneratorTool"/>
3385- <Tool
3386- Name="VCManagedWrapperGeneratorTool"/>
3387- <Tool
3388- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
3389- </Configuration>
3390- <Configuration
3391- Name="Release|Win32"
3392- OutputDirectory="../../build/cpput/release"
3393- IntermediateDirectory="../../build/cpput/release"
3394- ConfigurationType="4"
3395- CharacterSet="2">
3396- <Tool
3397- Name="VCCLCompilerTool"
3398- AdditionalIncludeDirectories="../../include"
3399- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
3400- StringPooling="TRUE"
3401- RuntimeLibrary="2"
3402- EnableFunctionLevelLinking="TRUE"
3403- TreatWChar_tAsBuiltInType="TRUE"
3404- ForceConformanceInForLoopScope="TRUE"
3405- UsePrecompiledHeader="0"
3406- WarningLevel="3"
3407- Detect64BitPortabilityProblems="FALSE"
3408- DebugInformationFormat="3"/>
3409- <Tool
3410- Name="VCCustomBuildTool"/>
3411- <Tool
3412- Name="VCLibrarianTool"
3413- OutputFile="$(OutDir)/cpput_vc71_libmd.lib"/>
3414- <Tool
3415- Name="VCMIDLTool"/>
3416- <Tool
3417- Name="VCPostBuildEventTool"/>
3418- <Tool
3419- Name="VCPreBuildEventTool"/>
3420- <Tool
3421- Name="VCPreLinkEventTool"/>
3422- <Tool
3423- Name="VCResourceCompilerTool"/>
3424- <Tool
3425- Name="VCWebServiceProxyGeneratorTool"/>
3426- <Tool
3427- Name="VCXMLDataGeneratorTool"/>
3428- <Tool
3429- Name="VCManagedWrapperGeneratorTool"/>
3430- <Tool
3431- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
3432- </Configuration>
3433- </Configurations>
3434- <References>
3435- </References>
3436- <Files>
3437- <Filter
3438- Name="codetorevisit"
3439- Filter="">
3440- <File
3441- RelativePath="..\..\src\cpput\parametrizedsource.cpp">
3442- </File>
3443- <File
3444- RelativePath="..\..\include\cpput\parametrizedsource.h">
3445- </File>
3446- <File
3447- RelativePath="..\..\src\cpput\tablefixture.cpp">
3448- <FileConfiguration
3449- Name="Debug|Win32"
3450- ExcludedFromBuild="TRUE">
3451- <Tool
3452- Name="VCCLCompilerTool"/>
3453- </FileConfiguration>
3454- <FileConfiguration
3455- Name="Release|Win32"
3456- ExcludedFromBuild="TRUE">
3457- <Tool
3458- Name="VCCLCompilerTool"/>
3459- </FileConfiguration>
3460- </File>
3461- <File
3462- RelativePath="..\..\include\cpput\tablefixture.h">
3463- </File>
3464- <File
3465- RelativePath="..\..\src\cpput\testrunner.cpp">
3466- <FileConfiguration
3467- Name="Debug|Win32"
3468- ExcludedFromBuild="TRUE">
3469- <Tool
3470- Name="VCCLCompilerTool"/>
3471- </FileConfiguration>
3472- <FileConfiguration
3473- Name="Release|Win32"
3474- ExcludedFromBuild="TRUE">
3475- <Tool
3476- Name="VCCLCompilerTool"/>
3477- </FileConfiguration>
3478- </File>
3479- <File
3480- RelativePath="..\..\include\cpput\testrunner.h">
3481- </File>
3482- </Filter>
3483- <Filter
3484- Name="doc"
3485- Filter="">
3486- <File
3487- RelativePath="..\..\doc\coding_guidelines.dox">
3488- </File>
3489- <File
3490- RelativePath="..\..\doc\cpput.dox">
3491- </File>
3492- <File
3493- RelativePath="..\..\doc\cpput_todo.dox">
3494- </File>
3495- <File
3496- RelativePath="..\..\doc\custom.css">
3497- </File>
3498- <File
3499- RelativePath="..\..\doc\doxyfile.in">
3500- </File>
3501- <File
3502- RelativePath="..\..\doc\footer.html">
3503- </File>
3504- <File
3505- RelativePath="..\..\doc\header.html">
3506- </File>
3507- </Filter>
3508- <File
3509- RelativePath="..\..\src\cpput\assert.cpp">
3510- </File>
3511- <File
3512- RelativePath="..\..\include\cpput\assertcommon.h">
3513- </File>
3514- <File
3515- RelativePath="..\..\include\cpput\assertenum.h">
3516- </File>
3517- <File
3518- RelativePath="..\..\src\cpput\assertstring.cpp">
3519- </File>
3520- <File
3521- RelativePath="..\..\include\cpput\assertstring.h">
3522- </File>
3523- <File
3524- RelativePath="..\..\include\cpput\autolink.h">
3525- </File>
3526- <File
3527- RelativePath="..\..\include\cpput\config.h">
3528- </File>
3529- <File
3530- RelativePath="..\..\src\cpput\dllproxy.cpp">
3531- </File>
3532- <File
3533- RelativePath="..\..\include\cpput\dllproxy.h">
3534- </File>
3535- <File
3536- RelativePath="..\..\include\cpput\equality.h">
3537- </File>
3538- <File
3539- RelativePath="..\..\src\cpput\exceptionguard.cpp">
3540- </File>
3541- <File
3542- RelativePath="..\..\include\cpput\exceptionguard.h">
3543- </File>
3544- <File
3545- RelativePath="..\..\src\cpput\extendeddata.cpp">
3546- </File>
3547- <File
3548- RelativePath="..\..\include\cpput\extendeddata.h">
3549- </File>
3550- <File
3551- RelativePath="..\..\include\cpput\forwards.h">
3552- </File>
3553- <File
3554- RelativePath="..\..\include\cpput\inputtest.h">
3555- </File>
3556- <File
3557- RelativePath="..\..\src\cpput\lighttestrunner.cpp">
3558- </File>
3559- <File
3560- RelativePath="..\..\include\cpput\lighttestrunner.h">
3561- </File>
3562- <File
3563- RelativePath="..\..\src\cpput\message.cpp">
3564- </File>
3565- <File
3566- RelativePath="..\..\include\cpput\message.h">
3567- </File>
3568- <File
3569- RelativePath="..\..\src\cpput\registry.cpp">
3570- </File>
3571- <File
3572- RelativePath="..\..\include\cpput\registry.h">
3573- </File>
3574- <File
3575- RelativePath="..\..\include\cpput\resource.h">
3576- </File>
3577- <File
3578- RelativePath="..\..\include\cpput\stringize.h">
3579- </File>
3580- <File
3581- RelativePath="..\..\include\cpput\test.h">
3582- </File>
3583- <File
3584- RelativePath="..\..\src\cpput\testcase.cpp">
3585- </File>
3586- <File
3587- RelativePath="..\..\include\cpput\testcase.h">
3588- </File>
3589- <File
3590- RelativePath="..\..\include\cpput\testfixture.h">
3591- </File>
3592- <File
3593- RelativePath="..\..\src\cpput\testinfo.cpp">
3594- </File>
3595- <File
3596- RelativePath="..\..\include\cpput\testinfo.h">
3597- </File>
3598- <File
3599- RelativePath="..\..\src\cpput\testsuite.cpp">
3600- </File>
3601- <File
3602- RelativePath="..\..\include\cpput\testsuite.h">
3603- </File>
3604- <File
3605- RelativePath="..\..\include\cpput\testvisitor.h">
3606- </File>
3607- <File
3608- RelativePath="..\..\include\cpput\translate.h">
3609- </File>
3610- </Files>
3611- <Globals>
3612- </Globals>
3613-</VisualStudioProject>
3614+<?xml version="1.0" encoding="Windows-1252"?>
3615+<VisualStudioProject
3616+ ProjectType="Visual C++"
3617+ Version="7.10"
3618+ Name="cpput_lib"
3619+ ProjectGUID="{79273A0D-700E-4AFA-B7F2-14D4CC325521}"
3620+ Keyword="Win32Proj">
3621+ <Platforms>
3622+ <Platform
3623+ Name="Win32"/>
3624+ </Platforms>
3625+ <Configurations>
3626+ <Configuration
3627+ Name="Debug|Win32"
3628+ OutputDirectory="../../build/cpput/debug"
3629+ IntermediateDirectory="../../build/cpput/debug"
3630+ ConfigurationType="4"
3631+ CharacterSet="2">
3632+ <Tool
3633+ Name="VCCLCompilerTool"
3634+ Optimization="0"
3635+ AdditionalIncludeDirectories="../../include"
3636+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
3637+ MinimalRebuild="TRUE"
3638+ BasicRuntimeChecks="3"
3639+ RuntimeLibrary="3"
3640+ BufferSecurityCheck="TRUE"
3641+ TreatWChar_tAsBuiltInType="TRUE"
3642+ ForceConformanceInForLoopScope="TRUE"
3643+ UsePrecompiledHeader="0"
3644+ WarningLevel="3"
3645+ Detect64BitPortabilityProblems="FALSE"
3646+ DebugInformationFormat="3"/>
3647+ <Tool
3648+ Name="VCCustomBuildTool"/>
3649+ <Tool
3650+ Name="VCLibrarianTool"
3651+ OutputFile="$(OutDir)/cpput_vc71_libmd.lib"/>
3652+ <Tool
3653+ Name="VCMIDLTool"/>
3654+ <Tool
3655+ Name="VCPostBuildEventTool"/>
3656+ <Tool
3657+ Name="VCPreBuildEventTool"/>
3658+ <Tool
3659+ Name="VCPreLinkEventTool"/>
3660+ <Tool
3661+ Name="VCResourceCompilerTool"/>
3662+ <Tool
3663+ Name="VCWebServiceProxyGeneratorTool"/>
3664+ <Tool
3665+ Name="VCXMLDataGeneratorTool"/>
3666+ <Tool
3667+ Name="VCManagedWrapperGeneratorTool"/>
3668+ <Tool
3669+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
3670+ </Configuration>
3671+ <Configuration
3672+ Name="Release|Win32"
3673+ OutputDirectory="../../build/cpput/release"
3674+ IntermediateDirectory="../../build/cpput/release"
3675+ ConfigurationType="4"
3676+ CharacterSet="2">
3677+ <Tool
3678+ Name="VCCLCompilerTool"
3679+ AdditionalIncludeDirectories="../../include"
3680+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
3681+ StringPooling="TRUE"
3682+ RuntimeLibrary="2"
3683+ EnableFunctionLevelLinking="TRUE"
3684+ TreatWChar_tAsBuiltInType="TRUE"
3685+ ForceConformanceInForLoopScope="TRUE"
3686+ UsePrecompiledHeader="0"
3687+ WarningLevel="3"
3688+ Detect64BitPortabilityProblems="FALSE"
3689+ DebugInformationFormat="3"/>
3690+ <Tool
3691+ Name="VCCustomBuildTool"/>
3692+ <Tool
3693+ Name="VCLibrarianTool"
3694+ OutputFile="$(OutDir)/cpput_vc71_libmd.lib"/>
3695+ <Tool
3696+ Name="VCMIDLTool"/>
3697+ <Tool
3698+ Name="VCPostBuildEventTool"/>
3699+ <Tool
3700+ Name="VCPreBuildEventTool"/>
3701+ <Tool
3702+ Name="VCPreLinkEventTool"/>
3703+ <Tool
3704+ Name="VCResourceCompilerTool"/>
3705+ <Tool
3706+ Name="VCWebServiceProxyGeneratorTool"/>
3707+ <Tool
3708+ Name="VCXMLDataGeneratorTool"/>
3709+ <Tool
3710+ Name="VCManagedWrapperGeneratorTool"/>
3711+ <Tool
3712+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
3713+ </Configuration>
3714+ </Configurations>
3715+ <References>
3716+ </References>
3717+ <Files>
3718+ <Filter
3719+ Name="codetorevisit"
3720+ Filter="">
3721+ <File
3722+ RelativePath="..\..\src\cpput\parametrizedsource.cpp">
3723+ <FileConfiguration
3724+ Name="Debug|Win32"
3725+ ExcludedFromBuild="TRUE">
3726+ <Tool
3727+ Name="VCCLCompilerTool"/>
3728+ </FileConfiguration>
3729+ <FileConfiguration
3730+ Name="Release|Win32"
3731+ ExcludedFromBuild="TRUE">
3732+ <Tool
3733+ Name="VCCLCompilerTool"/>
3734+ </FileConfiguration>
3735+ </File>
3736+ <File
3737+ RelativePath="..\..\include\cpput\parametrizedsource.h">
3738+ </File>
3739+ <File
3740+ RelativePath="..\..\src\cpput\tablefixture.cpp">
3741+ <FileConfiguration
3742+ Name="Debug|Win32"
3743+ ExcludedFromBuild="TRUE">
3744+ <Tool
3745+ Name="VCCLCompilerTool"/>
3746+ </FileConfiguration>
3747+ <FileConfiguration
3748+ Name="Release|Win32"
3749+ ExcludedFromBuild="TRUE">
3750+ <Tool
3751+ Name="VCCLCompilerTool"/>
3752+ </FileConfiguration>
3753+ </File>
3754+ <File
3755+ RelativePath="..\..\include\cpput\tablefixture.h">
3756+ </File>
3757+ <File
3758+ RelativePath="..\..\src\cpput\testrunner.cpp">
3759+ <FileConfiguration
3760+ Name="Debug|Win32"
3761+ ExcludedFromBuild="TRUE">
3762+ <Tool
3763+ Name="VCCLCompilerTool"/>
3764+ </FileConfiguration>
3765+ <FileConfiguration
3766+ Name="Release|Win32"
3767+ ExcludedFromBuild="TRUE">
3768+ <Tool
3769+ Name="VCCLCompilerTool"/>
3770+ </FileConfiguration>
3771+ </File>
3772+ <File
3773+ RelativePath="..\..\include\cpput\testrunner.h">
3774+ </File>
3775+ </Filter>
3776+ <Filter
3777+ Name="doc"
3778+ Filter="">
3779+ <File
3780+ RelativePath="..\..\doc\coding_guidelines.dox">
3781+ </File>
3782+ <File
3783+ RelativePath="..\..\doc\cpput.dox">
3784+ </File>
3785+ <File
3786+ RelativePath="..\..\doc\cpput_todo.dox">
3787+ </File>
3788+ <File
3789+ RelativePath="..\..\doc\custom.css">
3790+ </File>
3791+ <File
3792+ RelativePath="..\..\doc\doxyfile.in">
3793+ </File>
3794+ <File
3795+ RelativePath="..\..\doc\footer.html">
3796+ </File>
3797+ <File
3798+ RelativePath="..\..\doc\header.html">
3799+ </File>
3800+ </Filter>
3801+ <File
3802+ RelativePath="..\..\src\cpput\assert.cpp">
3803+ </File>
3804+ <File
3805+ RelativePath="..\..\include\cpput\assertcommon.h">
3806+ </File>
3807+ <File
3808+ RelativePath="..\..\include\cpput\assertenum.h">
3809+ </File>
3810+ <File
3811+ RelativePath="..\..\src\cpput\assertstring.cpp">
3812+ </File>
3813+ <File
3814+ RelativePath="..\..\include\cpput\assertstring.h">
3815+ </File>
3816+ <File
3817+ RelativePath="..\..\include\cpput\autolink.h">
3818+ </File>
3819+ <File
3820+ RelativePath="..\..\include\cpput\config.h">
3821+ </File>
3822+ <File
3823+ RelativePath="..\..\src\cpput\dllproxy.cpp">
3824+ </File>
3825+ <File
3826+ RelativePath="..\..\include\cpput\dllproxy.h">
3827+ </File>
3828+ <File
3829+ RelativePath="..\..\include\cpput\equality.h">
3830+ </File>
3831+ <File
3832+ RelativePath="..\..\src\cpput\exceptionguard.cpp">
3833+ </File>
3834+ <File
3835+ RelativePath="..\..\include\cpput\exceptionguard.h">
3836+ </File>
3837+ <File
3838+ RelativePath="..\..\src\cpput\extendeddata.cpp">
3839+ </File>
3840+ <File
3841+ RelativePath="..\..\include\cpput\extendeddata.h">
3842+ </File>
3843+ <File
3844+ RelativePath="..\..\include\cpput\forwards.h">
3845+ </File>
3846+ <File
3847+ RelativePath="..\..\include\cpput\inputbasedtest.h">
3848+ </File>
3849+ <File
3850+ RelativePath="..\..\include\cpput\inputtest.h">
3851+ </File>
3852+ <File
3853+ RelativePath="..\..\include\cpput\interface.h">
3854+ </File>
3855+ <File
3856+ RelativePath="..\..\include\cpput\lightfixture.h">
3857+ </File>
3858+ <File
3859+ RelativePath="..\..\src\cpput\lighttestrunner.cpp">
3860+ </File>
3861+ <File
3862+ RelativePath="..\..\include\cpput\lighttestrunner.h">
3863+ </File>
3864+ <File
3865+ RelativePath="..\..\src\cpput\message.cpp">
3866+ </File>
3867+ <File
3868+ RelativePath="..\..\include\cpput\message.h">
3869+ </File>
3870+ <File
3871+ RelativePath="..\..\include\cpput\opentestadaptor.h">
3872+ </File>
3873+ <File
3874+ RelativePath="..\..\src\cpput\registry.cpp">
3875+ </File>
3876+ <File
3877+ RelativePath="..\..\include\cpput\registry.h">
3878+ </File>
3879+ <File
3880+ RelativePath="..\..\src\cpput\resource.cpp">
3881+ </File>
3882+ <File
3883+ RelativePath="..\..\include\cpput\resource.h">
3884+ </File>
3885+ <File
3886+ RelativePath="..\..\include\cpput\stringize.h">
3887+ </File>
3888+ <File
3889+ RelativePath="..\..\include\cpput\test.h">
3890+ </File>
3891+ <File
3892+ RelativePath="..\..\src\cpput\testcase.cpp">
3893+ </File>
3894+ <File
3895+ RelativePath="..\..\include\cpput\testcase.h">
3896+ </File>
3897+ <File
3898+ RelativePath="..\..\include\cpput\testfixture.h">
3899+ </File>
3900+ <File
3901+ RelativePath="..\..\include\cpput\testfunction.h">
3902+ </File>
3903+ <File
3904+ RelativePath="..\..\src\cpput\testinfo.cpp">
3905+ </File>
3906+ <File
3907+ RelativePath="..\..\include\cpput\testinfo.h">
3908+ </File>
3909+ <File
3910+ RelativePath="..\..\include\cpput\testvisitor.h">
3911+ </File>
3912+ <File
3913+ RelativePath="..\..\include\cpput\translate.h">
3914+ </File>
3915+ </Files>
3916+ <Globals>
3917+ </Globals>
3918+</VisualStudioProject>
3919
3920=== modified file 'cppunit2/makefiles/vs71/cpput_test.vcproj'
3921--- cppunit2/makefiles/vs71/cpput_test.vcproj 2008-06-26 14:28:05 +0000
3922+++ cppunit2/makefiles/vs71/cpput_test.vcproj 2008-12-25 17:01:58 +0000
3923@@ -1,261 +1,282 @@
3924-<?xml version="1.0" encoding="Windows-1252"?>
3925-<VisualStudioProject
3926- ProjectType="Visual C++"
3927- Version="7.10"
3928- Name="cpput_test"
3929- ProjectGUID="{2506991E-13CA-49C9-8686-AACDE35C21B6}"
3930- RootNamespace="cpput_test"
3931- Keyword="Win32Proj">
3932- <Platforms>
3933- <Platform
3934- Name="Win32"/>
3935- </Platforms>
3936- <Configurations>
3937- <Configuration
3938- Name="Debug|Win32"
3939- OutputDirectory="../../build/cpput_test/debug"
3940- IntermediateDirectory="../../build/cpput_test/debug"
3941- ConfigurationType="1"
3942- CharacterSet="2">
3943- <Tool
3944- Name="VCCLCompilerTool"
3945- Optimization="0"
3946- AdditionalIncludeDirectories="../../include"
3947- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
3948- MinimalRebuild="TRUE"
3949- BasicRuntimeChecks="3"
3950- RuntimeLibrary="3"
3951- BufferSecurityCheck="TRUE"
3952- TreatWChar_tAsBuiltInType="TRUE"
3953- ForceConformanceInForLoopScope="TRUE"
3954- UsePrecompiledHeader="0"
3955- WarningLevel="3"
3956- Detect64BitPortabilityProblems="FALSE"
3957- DebugInformationFormat="3"/>
3958- <Tool
3959- Name="VCCustomBuildTool"/>
3960- <Tool
3961- Name="VCLinkerTool"
3962- OutputFile="$(OutDir)/cpput_test.exe"
3963- LinkIncremental="2"
3964- GenerateDebugInformation="TRUE"
3965- ProgramDatabaseFile="$(OutDir)/cpput_test.pdb"
3966- SubSystem="1"
3967- TargetMachine="1"/>
3968- <Tool
3969- Name="VCMIDLTool"/>
3970- <Tool
3971- Name="VCPostBuildEventTool"
3972- Description="Running post-build unit tests"
3973- CommandLine="$(TargetPath)"/>
3974- <Tool
3975- Name="VCPreBuildEventTool"/>
3976- <Tool
3977- Name="VCPreLinkEventTool"/>
3978- <Tool
3979- Name="VCResourceCompilerTool"/>
3980- <Tool
3981- Name="VCWebServiceProxyGeneratorTool"/>
3982- <Tool
3983- Name="VCXMLDataGeneratorTool"/>
3984- <Tool
3985- Name="VCWebDeploymentTool"/>
3986- <Tool
3987- Name="VCManagedWrapperGeneratorTool"/>
3988- <Tool
3989- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
3990- </Configuration>
3991- <Configuration
3992- Name="Release|Win32"
3993- OutputDirectory="../../build/cpput_test/release"
3994- IntermediateDirectory="../../build/cpput_test/release"
3995- ConfigurationType="1"
3996- CharacterSet="2">
3997- <Tool
3998- Name="VCCLCompilerTool"
3999- AdditionalIncludeDirectories="../../include"
4000- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
4001- StringPooling="TRUE"
4002- RuntimeLibrary="2"
4003- EnableFunctionLevelLinking="TRUE"
4004- TreatWChar_tAsBuiltInType="TRUE"
4005- ForceConformanceInForLoopScope="TRUE"
4006- UsePrecompiledHeader="0"
4007- WarningLevel="3"
4008- Detect64BitPortabilityProblems="FALSE"
4009- DebugInformationFormat="3"/>
4010- <Tool
4011- Name="VCCustomBuildTool"/>
4012- <Tool
4013- Name="VCLinkerTool"
4014- OutputFile="$(OutDir)/cpput_test.exe"
4015- LinkIncremental="1"
4016- GenerateDebugInformation="TRUE"
4017- SubSystem="1"
4018- OptimizeReferences="2"
4019- EnableCOMDATFolding="2"
4020- TargetMachine="1"/>
4021- <Tool
4022- Name="VCMIDLTool"/>
4023- <Tool
4024- Name="VCPostBuildEventTool"
4025- Description="Running post-build unit tests"
4026- CommandLine="$(TargetPath)"/>
4027- <Tool
4028- Name="VCPreBuildEventTool"/>
4029- <Tool
4030- Name="VCPreLinkEventTool"/>
4031- <Tool
4032- Name="VCResourceCompilerTool"/>
4033- <Tool
4034- Name="VCWebServiceProxyGeneratorTool"/>
4035- <Tool
4036- Name="VCXMLDataGeneratorTool"/>
4037- <Tool
4038- Name="VCWebDeploymentTool"/>
4039- <Tool
4040- Name="VCManagedWrapperGeneratorTool"/>
4041- <Tool
4042- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
4043- </Configuration>
4044- </Configurations>
4045- <References>
4046- </References>
4047- <Files>
4048- <Filter
4049- Name="codetorevisit"
4050- Filter="">
4051- <File
4052- RelativePath="..\..\src\cpputtest\testfunctor2.cpp">
4053- <FileConfiguration
4054- Name="Debug|Win32"
4055- ExcludedFromBuild="TRUE">
4056- <Tool
4057- Name="VCCLCompilerTool"/>
4058- </FileConfiguration>
4059- <FileConfiguration
4060- Name="Release|Win32"
4061- ExcludedFromBuild="TRUE">
4062- <Tool
4063- Name="VCCLCompilerTool"/>
4064- </FileConfiguration>
4065- </File>
4066- <File
4067- RelativePath="..\..\src\cpputtest\testfunctor3.cpp">
4068- <FileConfiguration
4069- Name="Debug|Win32"
4070- ExcludedFromBuild="TRUE">
4071- <Tool
4072- Name="VCCLCompilerTool"/>
4073- </FileConfiguration>
4074- <FileConfiguration
4075- Name="Release|Win32"
4076- ExcludedFromBuild="TRUE">
4077- <Tool
4078- Name="VCCLCompilerTool"/>
4079- </FileConfiguration>
4080- </File>
4081- <File
4082- RelativePath="..\..\src\cpputtest\testtestrunresult.cpp">
4083- <FileConfiguration
4084- Name="Debug|Win32"
4085- ExcludedFromBuild="TRUE">
4086- <Tool
4087- Name="VCCLCompilerTool"/>
4088- </FileConfiguration>
4089- <FileConfiguration
4090- Name="Release|Win32"
4091- ExcludedFromBuild="TRUE">
4092- <Tool
4093- Name="VCCLCompilerTool"/>
4094- </FileConfiguration>
4095- </File>
4096- </Filter>
4097- <File
4098- RelativePath="..\..\src\cpputtest\assertenumtest.cpp">
4099- </File>
4100- <File
4101- RelativePath="..\..\src\cpputtest\assertenumtest.h">
4102- </File>
4103- <File
4104- RelativePath="..\..\src\cpputtest\assertstringtest.cpp">
4105- </File>
4106- <File
4107- RelativePath="..\..\src\cpputtest\assertstringtest.h">
4108- </File>
4109- <File
4110- RelativePath="..\..\src\cpputtest\commandlineoptionstest.cpp">
4111- </File>
4112- <File
4113- RelativePath="..\..\src\cpputtest\commandlineoptionstest.h">
4114- </File>
4115- <File
4116- RelativePath="..\..\src\cpputtest\enumeratortest.cpp">
4117- </File>
4118- <File
4119- RelativePath="..\..\src\cpputtest\enumeratortest.h">
4120- </File>
4121- <File
4122- RelativePath="..\..\src\cpputtest\main.cpp">
4123- </File>
4124- <File
4125- RelativePath="..\..\src\cpputtest\minitestrunner.h">
4126- </File>
4127- <File
4128- RelativePath="..\..\src\cpputtest\mocktestlistener.h">
4129- </File>
4130- <File
4131- RelativePath="..\..\src\cpputtest\mocktestvisitor.h">
4132- </File>
4133- <File
4134- RelativePath="..\..\src\cpputtest\reflectiontest.cpp">
4135- </File>
4136- <File
4137- RelativePath="..\..\src\cpputtest\reflectiontest.h">
4138- </File>
4139- <File
4140- RelativePath="..\..\src\cpputtest\registrytest.cpp">
4141- </File>
4142- <File
4143- RelativePath="..\..\src\cpputtest\registrytest.h">
4144- </File>
4145- <File
4146- RelativePath="..\..\src\cpputtest\smallmaptest.cpp">
4147- </File>
4148- <File
4149- RelativePath="..\..\src\cpputtest\smallmaptest.h">
4150- </File>
4151- <File
4152- RelativePath="..\..\src\cpputtest\testbasicassertion.cpp">
4153- </File>
4154- <File
4155- RelativePath="..\..\src\cpputtest\testexceptionguard.cpp">
4156- </File>
4157- <File
4158- RelativePath="..\..\src\cpputtest\testfixturetest.cpp">
4159- </File>
4160- <File
4161- RelativePath="..\..\src\cpputtest\testfixturetest.h">
4162- </File>
4163- <File
4164- RelativePath="..\..\src\cpputtest\testfunctor.cpp">
4165- </File>
4166- <File
4167- RelativePath="..\..\src\cpputtest\testinfotest.cpp">
4168- </File>
4169- <File
4170- RelativePath="..\..\src\cpputtest\testtestcase.cpp">
4171- </File>
4172- <File
4173- RelativePath="..\..\src\cpputtest\testtestsuite.cpp">
4174- </File>
4175- <File
4176- RelativePath="..\..\src\cpputtest\valuetest.cpp">
4177- </File>
4178- <File
4179- RelativePath="..\..\src\cpputtest\valuetest.h">
4180- </File>
4181- </Files>
4182- <Globals>
4183- </Globals>
4184-</VisualStudioProject>
4185+<?xml version="1.0" encoding="Windows-1252"?>
4186+<VisualStudioProject
4187+ ProjectType="Visual C++"
4188+ Version="7.10"
4189+ Name="cpput_test"
4190+ ProjectGUID="{2506991E-13CA-49C9-8686-AACDE35C21B6}"
4191+ RootNamespace="cpput_test"
4192+ Keyword="Win32Proj">
4193+ <Platforms>
4194+ <Platform
4195+ Name="Win32"/>
4196+ </Platforms>
4197+ <Configurations>
4198+ <Configuration
4199+ Name="Debug|Win32"
4200+ OutputDirectory="../../build/cpput_test/debug"
4201+ IntermediateDirectory="../../build/cpput_test/debug"
4202+ ConfigurationType="1"
4203+ CharacterSet="2">
4204+ <Tool
4205+ Name="VCCLCompilerTool"
4206+ Optimization="0"
4207+ AdditionalIncludeDirectories="../../include"
4208+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
4209+ MinimalRebuild="TRUE"
4210+ BasicRuntimeChecks="3"
4211+ RuntimeLibrary="3"
4212+ BufferSecurityCheck="TRUE"
4213+ TreatWChar_tAsBuiltInType="TRUE"
4214+ ForceConformanceInForLoopScope="TRUE"
4215+ UsePrecompiledHeader="0"
4216+ WarningLevel="3"
4217+ Detect64BitPortabilityProblems="FALSE"
4218+ DebugInformationFormat="3"/>
4219+ <Tool
4220+ Name="VCCustomBuildTool"/>
4221+ <Tool
4222+ Name="VCLinkerTool"
4223+ OutputFile="$(OutDir)/cpput_test.exe"
4224+ LinkIncremental="2"
4225+ GenerateDebugInformation="TRUE"
4226+ ProgramDatabaseFile="$(OutDir)/cpput_test.pdb"
4227+ SubSystem="1"
4228+ TargetMachine="1"/>
4229+ <Tool
4230+ Name="VCMIDLTool"/>
4231+ <Tool
4232+ Name="VCPostBuildEventTool"
4233+ Description="Running post-build unit tests"
4234+ CommandLine="$(TargetPath)"/>
4235+ <Tool
4236+ Name="VCPreBuildEventTool"/>
4237+ <Tool
4238+ Name="VCPreLinkEventTool"/>
4239+ <Tool
4240+ Name="VCResourceCompilerTool"/>
4241+ <Tool
4242+ Name="VCWebServiceProxyGeneratorTool"/>
4243+ <Tool
4244+ Name="VCXMLDataGeneratorTool"/>
4245+ <Tool
4246+ Name="VCWebDeploymentTool"/>
4247+ <Tool
4248+ Name="VCManagedWrapperGeneratorTool"/>
4249+ <Tool
4250+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
4251+ </Configuration>
4252+ <Configuration
4253+ Name="Release|Win32"
4254+ OutputDirectory="../../build/cpput_test/release"
4255+ IntermediateDirectory="../../build/cpput_test/release"
4256+ ConfigurationType="1"
4257+ CharacterSet="2">
4258+ <Tool
4259+ Name="VCCLCompilerTool"
4260+ AdditionalIncludeDirectories="../../include"
4261+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
4262+ StringPooling="TRUE"
4263+ RuntimeLibrary="2"
4264+ EnableFunctionLevelLinking="TRUE"
4265+ TreatWChar_tAsBuiltInType="TRUE"
4266+ ForceConformanceInForLoopScope="TRUE"
4267+ UsePrecompiledHeader="0"
4268+ WarningLevel="3"
4269+ Detect64BitPortabilityProblems="FALSE"
4270+ DebugInformationFormat="3"/>
4271+ <Tool
4272+ Name="VCCustomBuildTool"/>
4273+ <Tool
4274+ Name="VCLinkerTool"
4275+ OutputFile="$(OutDir)/cpput_test.exe"
4276+ LinkIncremental="1"
4277+ GenerateDebugInformation="TRUE"
4278+ SubSystem="1"
4279+ OptimizeReferences="2"
4280+ EnableCOMDATFolding="2"
4281+ TargetMachine="1"/>
4282+ <Tool
4283+ Name="VCMIDLTool"/>
4284+ <Tool
4285+ Name="VCPostBuildEventTool"
4286+ Description="Running post-build unit tests"
4287+ CommandLine="$(TargetPath)"/>
4288+ <Tool
4289+ Name="VCPreBuildEventTool"/>
4290+ <Tool
4291+ Name="VCPreLinkEventTool"/>
4292+ <Tool
4293+ Name="VCResourceCompilerTool"/>
4294+ <Tool
4295+ Name="VCWebServiceProxyGeneratorTool"/>
4296+ <Tool
4297+ Name="VCXMLDataGeneratorTool"/>
4298+ <Tool
4299+ Name="VCWebDeploymentTool"/>
4300+ <Tool
4301+ Name="VCManagedWrapperGeneratorTool"/>
4302+ <Tool
4303+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
4304+ </Configuration>
4305+ </Configurations>
4306+ <References>
4307+ </References>
4308+ <Files>
4309+ <Filter
4310+ Name="codetorevisit"
4311+ Filter="">
4312+ <File
4313+ RelativePath="..\..\src\cpputtest\testfunctor2.cpp">
4314+ <FileConfiguration
4315+ Name="Debug|Win32"
4316+ ExcludedFromBuild="TRUE">
4317+ <Tool
4318+ Name="VCCLCompilerTool"/>
4319+ </FileConfiguration>
4320+ <FileConfiguration
4321+ Name="Release|Win32"
4322+ ExcludedFromBuild="TRUE">
4323+ <Tool
4324+ Name="VCCLCompilerTool"/>
4325+ </FileConfiguration>
4326+ </File>
4327+ <File
4328+ RelativePath="..\..\src\cpputtest\testfunctor3.cpp">
4329+ <FileConfiguration
4330+ Name="Debug|Win32"
4331+ ExcludedFromBuild="TRUE">
4332+ <Tool
4333+ Name="VCCLCompilerTool"/>
4334+ </FileConfiguration>
4335+ <FileConfiguration
4336+ Name="Release|Win32"
4337+ ExcludedFromBuild="TRUE">
4338+ <Tool
4339+ Name="VCCLCompilerTool"/>
4340+ </FileConfiguration>
4341+ </File>
4342+ <File
4343+ RelativePath="..\..\src\cpputtest\testtestrunresult.cpp">
4344+ <FileConfiguration
4345+ Name="Debug|Win32"
4346+ ExcludedFromBuild="TRUE">
4347+ <Tool
4348+ Name="VCCLCompilerTool"/>
4349+ </FileConfiguration>
4350+ <FileConfiguration
4351+ Name="Release|Win32"
4352+ ExcludedFromBuild="TRUE">
4353+ <Tool
4354+ Name="VCCLCompilerTool"/>
4355+ </FileConfiguration>
4356+ </File>
4357+ </Filter>
4358+ <File
4359+ RelativePath="..\..\src\cpputtest\assertenumtest.cpp">
4360+ </File>
4361+ <File
4362+ RelativePath="..\..\src\cpputtest\assertenumtest.h">
4363+ </File>
4364+ <File
4365+ RelativePath="..\..\src\cpputtest\assertstringtest.cpp">
4366+ </File>
4367+ <File
4368+ RelativePath="..\..\src\cpputtest\assertstringtest.h">
4369+ </File>
4370+ <File
4371+ RelativePath="..\..\src\cpputtest\commandlineoptionstest.cpp">
4372+ <FileConfiguration
4373+ Name="Debug|Win32"
4374+ ExcludedFromBuild="TRUE">
4375+ <Tool
4376+ Name="VCCLCompilerTool"/>
4377+ </FileConfiguration>
4378+ <FileConfiguration
4379+ Name="Release|Win32"
4380+ ExcludedFromBuild="TRUE">
4381+ <Tool
4382+ Name="VCCLCompilerTool"/>
4383+ </FileConfiguration>
4384+ </File>
4385+ <File
4386+ RelativePath="..\..\src\cpputtest\commandlineoptionstest.h">
4387+ </File>
4388+ <File
4389+ RelativePath="..\..\src\cpputtest\enumeratortest.cpp">
4390+ </File>
4391+ <File
4392+ RelativePath="..\..\src\cpputtest\enumeratortest.h">
4393+ </File>
4394+ <File
4395+ RelativePath="..\..\src\cpputtest\main.cpp">
4396+ </File>
4397+ <File
4398+ RelativePath="..\..\src\cpputtest\minitestrunner.h">
4399+ </File>
4400+ <File
4401+ RelativePath="..\..\src\cpputtest\mocktestlistener.h">
4402+ </File>
4403+ <File
4404+ RelativePath="..\..\src\cpputtest\mocktestvisitor.h">
4405+ </File>
4406+ <File
4407+ RelativePath="..\..\src\cpputtest\reflectiontest.cpp">
4408+ </File>
4409+ <File
4410+ RelativePath="..\..\src\cpputtest\reflectiontest.h">
4411+ </File>
4412+ <File
4413+ RelativePath="..\..\src\cpputtest\registrytest.cpp">
4414+ </File>
4415+ <File
4416+ RelativePath="..\..\src\cpputtest\registrytest.h">
4417+ </File>
4418+ <File
4419+ RelativePath="..\..\src\cpputtest\smallmaptest.cpp">
4420+ </File>
4421+ <File
4422+ RelativePath="..\..\src\cpputtest\smallmaptest.h">
4423+ </File>
4424+ <File
4425+ RelativePath="..\..\src\cpputtest\testbasicassertion.cpp">
4426+ </File>
4427+ <File
4428+ RelativePath="..\..\src\cpputtest\testexceptionguard.cpp">
4429+ </File>
4430+ <File
4431+ RelativePath="..\..\src\cpputtest\testfixturetest.cpp">
4432+ </File>
4433+ <File
4434+ RelativePath="..\..\src\cpputtest\testfunctor.cpp">
4435+ </File>
4436+ <File
4437+ RelativePath="..\..\src\cpputtest\testinfotest.cpp">
4438+ </File>
4439+ <File
4440+ RelativePath="..\..\src\cpputtest\testtestcase.cpp">
4441+ </File>
4442+ <File
4443+ RelativePath="..\..\src\cpputtest\testtestsuite.cpp">
4444+ <FileConfiguration
4445+ Name="Debug|Win32"
4446+ ExcludedFromBuild="TRUE">
4447+ <Tool
4448+ Name="VCCLCompilerTool"/>
4449+ </FileConfiguration>
4450+ <FileConfiguration
4451+ Name="Release|Win32"
4452+ ExcludedFromBuild="TRUE">
4453+ <Tool
4454+ Name="VCCLCompilerTool"/>
4455+ </FileConfiguration>
4456+ </File>
4457+ <File
4458+ RelativePath="..\..\src\cpputtest\valuetest.cpp">
4459+ </File>
4460+ <File
4461+ RelativePath="..\..\src\cpputtest\valuetest.h">
4462+ </File>
4463+ </Files>
4464+ <Globals>
4465+ </Globals>
4466+</VisualStudioProject>
4467
4468=== modified file 'cppunit2/makefiles/vs80/cpput_lib.vcproj'
4469--- cppunit2/makefiles/vs80/cpput_lib.vcproj 2008-07-13 06:19:20 +0000
4470+++ cppunit2/makefiles/vs80/cpput_lib.vcproj 2008-12-20 10:16:30 +0000
4471@@ -1,402 +1,414 @@
4472-<?xml version="1.0" encoding="Windows-1252"?>
4473-<VisualStudioProject
4474- ProjectType="Visual C++"
4475- Version="8,00"
4476- Name="cpput_lib"
4477- ProjectGUID="{79273A0D-700E-4AFA-B7F2-14D4CC325521}"
4478- Keyword="Win32Proj"
4479- >
4480- <Platforms>
4481- <Platform
4482- Name="Win32"
4483- />
4484- </Platforms>
4485- <ToolFiles>
4486- </ToolFiles>
4487- <Configurations>
4488- <Configuration
4489- Name="Debug|Win32"
4490- OutputDirectory="../../build/cpput/debug"
4491- IntermediateDirectory="../../build/cpput/debug"
4492- ConfigurationType="4"
4493- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
4494- CharacterSet="2"
4495- >
4496- <Tool
4497- Name="VCPreBuildEventTool"
4498- />
4499- <Tool
4500- Name="VCCustomBuildTool"
4501- />
4502- <Tool
4503- Name="VCXMLDataGeneratorTool"
4504- />
4505- <Tool
4506- Name="VCWebServiceProxyGeneratorTool"
4507- />
4508- <Tool
4509- Name="VCMIDLTool"
4510- />
4511- <Tool
4512- Name="VCCLCompilerTool"
4513- Optimization="0"
4514- AdditionalIncludeDirectories="../../include"
4515- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
4516- MinimalRebuild="true"
4517- BasicRuntimeChecks="3"
4518- RuntimeLibrary="3"
4519- BufferSecurityCheck="true"
4520- TreatWChar_tAsBuiltInType="true"
4521- ForceConformanceInForLoopScope="true"
4522- UsePrecompiledHeader="0"
4523- WarningLevel="3"
4524- Detect64BitPortabilityProblems="false"
4525- DebugInformationFormat="3"
4526- />
4527- <Tool
4528- Name="VCManagedResourceCompilerTool"
4529- />
4530- <Tool
4531- Name="VCResourceCompilerTool"
4532- />
4533- <Tool
4534- Name="VCPreLinkEventTool"
4535- />
4536- <Tool
4537- Name="VCLibrarianTool"
4538- OutputFile="$(OutDir)/cpput_vc71_libmd.lib"
4539- />
4540- <Tool
4541- Name="VCALinkTool"
4542- />
4543- <Tool
4544- Name="VCXDCMakeTool"
4545- />
4546- <Tool
4547- Name="VCBscMakeTool"
4548- />
4549- <Tool
4550- Name="VCFxCopTool"
4551- />
4552- <Tool
4553- Name="VCPostBuildEventTool"
4554- />
4555- </Configuration>
4556- <Configuration
4557- Name="Release|Win32"
4558- OutputDirectory="../../build/cpput/release"
4559- IntermediateDirectory="../../build/cpput/release"
4560- ConfigurationType="4"
4561- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
4562- CharacterSet="2"
4563- >
4564- <Tool
4565- Name="VCPreBuildEventTool"
4566- />
4567- <Tool
4568- Name="VCCustomBuildTool"
4569- />
4570- <Tool
4571- Name="VCXMLDataGeneratorTool"
4572- />
4573- <Tool
4574- Name="VCWebServiceProxyGeneratorTool"
4575- />
4576- <Tool
4577- Name="VCMIDLTool"
4578- />
4579- <Tool
4580- Name="VCCLCompilerTool"
4581- AdditionalIncludeDirectories="../../include"
4582- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
4583- StringPooling="true"
4584- RuntimeLibrary="2"
4585- EnableFunctionLevelLinking="true"
4586- TreatWChar_tAsBuiltInType="true"
4587- ForceConformanceInForLoopScope="true"
4588- UsePrecompiledHeader="0"
4589- WarningLevel="3"
4590- Detect64BitPortabilityProblems="false"
4591- DebugInformationFormat="3"
4592- />
4593- <Tool
4594- Name="VCManagedResourceCompilerTool"
4595- />
4596- <Tool
4597- Name="VCResourceCompilerTool"
4598- />
4599- <Tool
4600- Name="VCPreLinkEventTool"
4601- />
4602- <Tool
4603- Name="VCLibrarianTool"
4604- OutputFile="$(OutDir)/cpput_vc71_libmd.lib"
4605- />
4606- <Tool
4607- Name="VCALinkTool"
4608- />
4609- <Tool
4610- Name="VCXDCMakeTool"
4611- />
4612- <Tool
4613- Name="VCBscMakeTool"
4614- />
4615- <Tool
4616- Name="VCFxCopTool"
4617- />
4618- <Tool
4619- Name="VCPostBuildEventTool"
4620- />
4621- </Configuration>
4622- </Configurations>
4623- <References>
4624- </References>
4625- <Files>
4626- <Filter
4627- Name="codetorevisit"
4628- >
4629- <File
4630- RelativePath="..\..\src\cpput\parametrizedsource.cpp"
4631- >
4632- </File>
4633- <File
4634- RelativePath="..\..\include\cpput\parametrizedsource.h"
4635- >
4636- </File>
4637- <File
4638- RelativePath="..\..\src\cpput\tablefixture.cpp"
4639- >
4640- <FileConfiguration
4641- Name="Debug|Win32"
4642- ExcludedFromBuild="true"
4643- >
4644- <Tool
4645- Name="VCCLCompilerTool"
4646- />
4647- </FileConfiguration>
4648- <FileConfiguration
4649- Name="Release|Win32"
4650- ExcludedFromBuild="true"
4651- >
4652- <Tool
4653- Name="VCCLCompilerTool"
4654- />
4655- </FileConfiguration>
4656- </File>
4657- <File
4658- RelativePath="..\..\src\cpput\testrunner.cpp"
4659- >
4660- <FileConfiguration
4661- Name="Debug|Win32"
4662- ExcludedFromBuild="true"
4663- >
4664- <Tool
4665- Name="VCCLCompilerTool"
4666- />
4667- </FileConfiguration>
4668- <FileConfiguration
4669- Name="Release|Win32"
4670- ExcludedFromBuild="true"
4671- >
4672- <Tool
4673- Name="VCCLCompilerTool"
4674- />
4675- </FileConfiguration>
4676- </File>
4677- <File
4678- RelativePath="..\..\include\cpput\testrunner.h"
4679- >
4680- </File>
4681- </Filter>
4682- <Filter
4683- Name="doc"
4684- >
4685- <File
4686- RelativePath="..\..\changelog.txt"
4687- >
4688- </File>
4689- <File
4690- RelativePath="..\..\doc\coding_guidelines.dox"
4691- >
4692- </File>
4693- <File
4694- RelativePath="..\..\doc\cpput.dox"
4695- >
4696- </File>
4697- <File
4698- RelativePath="..\..\doc\cpput_todo.dox"
4699- >
4700- </File>
4701- <File
4702- RelativePath="..\..\doc\custom.css"
4703- >
4704- </File>
4705- <File
4706- RelativePath="..\..\doc\doxyfile.in"
4707- >
4708- </File>
4709- <File
4710- RelativePath="..\..\doc\footer.html"
4711- >
4712- </File>
4713- <File
4714- RelativePath="..\..\doc\header.html"
4715- >
4716- </File>
4717- </Filter>
4718- <File
4719- RelativePath="..\..\src\cpput\assert.cpp"
4720- >
4721- </File>
4722- <File
4723- RelativePath="..\..\include\cpput\assertcommon.h"
4724- >
4725- </File>
4726- <File
4727- RelativePath="..\..\include\cpput\assertenum.h"
4728- >
4729- </File>
4730- <File
4731- RelativePath="..\..\src\cpput\assertstring.cpp"
4732- >
4733- </File>
4734- <File
4735- RelativePath="..\..\include\cpput\assertstring.h"
4736- >
4737- </File>
4738- <File
4739- RelativePath="..\..\include\cpput\autolink.h"
4740- >
4741- </File>
4742- <File
4743- RelativePath="..\..\include\cpput\config.h"
4744- >
4745- </File>
4746- <File
4747- RelativePath="..\..\src\cpput\dllproxy.cpp"
4748- >
4749- </File>
4750- <File
4751- RelativePath="..\..\include\cpput\dllproxy.h"
4752- >
4753- </File>
4754- <File
4755- RelativePath="..\..\include\cpput\equality.h"
4756- >
4757- </File>
4758- <File
4759- RelativePath="..\..\src\cpput\exceptionguard.cpp"
4760- >
4761- </File>
4762- <File
4763- RelativePath="..\..\include\cpput\exceptionguard.h"
4764- >
4765- </File>
4766- <File
4767- RelativePath="..\..\src\cpput\extendeddata.cpp"
4768- >
4769- </File>
4770- <File
4771- RelativePath="..\..\include\cpput\extendeddata.h"
4772- >
4773- </File>
4774- <File
4775- RelativePath="..\..\include\cpput\forwards.h"
4776- >
4777- </File>
4778- <File
4779- RelativePath="..\..\include\cpput\inputbasedtest.h"
4780- >
4781- </File>
4782- <File
4783- RelativePath="..\..\include\cpput\lightfixture.h"
4784- >
4785- </File>
4786- <File
4787- RelativePath="..\..\src\cpput\lighttestrunner.cpp"
4788- >
4789- </File>
4790- <File
4791- RelativePath="..\..\include\cpput\lighttestrunner.h"
4792- >
4793- </File>
4794- <File
4795- RelativePath="..\..\src\cpput\message.cpp"
4796- >
4797- </File>
4798- <File
4799- RelativePath="..\..\include\cpput\message.h"
4800- >
4801- </File>
4802- <File
4803- RelativePath="..\..\src\cpput\registry.cpp"
4804- >
4805- </File>
4806- <File
4807- RelativePath="..\..\include\cpput\registry.h"
4808- >
4809- </File>
4810- <File
4811- RelativePath="..\..\src\cpput\resource.cpp"
4812- >
4813- </File>
4814- <File
4815- RelativePath="..\..\include\cpput\resource.h"
4816- >
4817- </File>
4818- <File
4819- RelativePath="..\..\include\cpput\stringize.h"
4820- >
4821- </File>
4822- <File
4823- RelativePath="..\..\include\cpput\tablefixture.h"
4824- >
4825- </File>
4826- <File
4827- RelativePath="..\..\include\cpput\test.h"
4828- >
4829- </File>
4830- <File
4831- RelativePath="..\..\src\cpput\testcase.cpp"
4832- >
4833- </File>
4834- <File
4835- RelativePath="..\..\include\cpput\testcase.h"
4836- >
4837- </File>
4838- <File
4839- RelativePath="..\..\include\cpput\testfixture.h"
4840- >
4841- </File>
4842- <File
4843- RelativePath="..\..\include\cpput\testfunction.h"
4844- >
4845- </File>
4846- <File
4847- RelativePath="..\..\src\cpput\testinfo.cpp"
4848- >
4849- </File>
4850- <File
4851- RelativePath="..\..\include\cpput\testinfo.h"
4852- >
4853- </File>
4854- <File
4855- RelativePath="..\..\src\cpput\testsuite.cpp"
4856- >
4857- </File>
4858- <File
4859- RelativePath="..\..\include\cpput\testsuite.h"
4860- >
4861- </File>
4862- <File
4863- RelativePath="..\..\include\cpput\testvisitor.h"
4864- >
4865- </File>
4866- <File
4867- RelativePath="..\..\include\cpput\translate.h"
4868- >
4869- </File>
4870- </Files>
4871- <Globals>
4872- </Globals>
4873-</VisualStudioProject>
4874+<?xml version="1.0" encoding="Windows-1252"?>
4875+<VisualStudioProject
4876+ ProjectType="Visual C++"
4877+ Version="8,00"
4878+ Name="cpput_lib"
4879+ ProjectGUID="{79273A0D-700E-4AFA-B7F2-14D4CC325521}"
4880+ Keyword="Win32Proj"
4881+ >
4882+ <Platforms>
4883+ <Platform
4884+ Name="Win32"
4885+ />
4886+ </Platforms>
4887+ <ToolFiles>
4888+ </ToolFiles>
4889+ <Configurations>
4890+ <Configuration
4891+ Name="Debug|Win32"
4892+ OutputDirectory="../../build/cpput/debug"
4893+ IntermediateDirectory="../../build/cpput/debug"
4894+ ConfigurationType="4"
4895+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
4896+ CharacterSet="2"
4897+ >
4898+ <Tool
4899+ Name="VCPreBuildEventTool"
4900+ />
4901+ <Tool
4902+ Name="VCCustomBuildTool"
4903+ />
4904+ <Tool
4905+ Name="VCXMLDataGeneratorTool"
4906+ />
4907+ <Tool
4908+ Name="VCWebServiceProxyGeneratorTool"
4909+ />
4910+ <Tool
4911+ Name="VCMIDLTool"
4912+ />
4913+ <Tool
4914+ Name="VCCLCompilerTool"
4915+ Optimization="0"
4916+ AdditionalIncludeDirectories="../../include"
4917+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
4918+ MinimalRebuild="true"
4919+ BasicRuntimeChecks="3"
4920+ RuntimeLibrary="3"
4921+ BufferSecurityCheck="true"
4922+ TreatWChar_tAsBuiltInType="true"
4923+ ForceConformanceInForLoopScope="true"
4924+ UsePrecompiledHeader="0"
4925+ WarningLevel="3"
4926+ Detect64BitPortabilityProblems="false"
4927+ DebugInformationFormat="3"
4928+ />
4929+ <Tool
4930+ Name="VCManagedResourceCompilerTool"
4931+ />
4932+ <Tool
4933+ Name="VCResourceCompilerTool"
4934+ />
4935+ <Tool
4936+ Name="VCPreLinkEventTool"
4937+ />
4938+ <Tool
4939+ Name="VCLibrarianTool"
4940+ OutputFile="$(OutDir)/cpput_vc71_libmd.lib"
4941+ />
4942+ <Tool
4943+ Name="VCALinkTool"
4944+ />
4945+ <Tool
4946+ Name="VCXDCMakeTool"
4947+ />
4948+ <Tool
4949+ Name="VCBscMakeTool"
4950+ />
4951+ <Tool
4952+ Name="VCFxCopTool"
4953+ />
4954+ <Tool
4955+ Name="VCPostBuildEventTool"
4956+ />
4957+ </Configuration>
4958+ <Configuration
4959+ Name="Release|Win32"
4960+ OutputDirectory="../../build/cpput/release"
4961+ IntermediateDirectory="../../build/cpput/release"
4962+ ConfigurationType="4"
4963+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
4964+ CharacterSet="2"
4965+ >
4966+ <Tool
4967+ Name="VCPreBuildEventTool"
4968+ />
4969+ <Tool
4970+ Name="VCCustomBuildTool"
4971+ />
4972+ <Tool
4973+ Name="VCXMLDataGeneratorTool"
4974+ />
4975+ <Tool
4976+ Name="VCWebServiceProxyGeneratorTool"
4977+ />
4978+ <Tool
4979+ Name="VCMIDLTool"
4980+ />
4981+ <Tool
4982+ Name="VCCLCompilerTool"
4983+ AdditionalIncludeDirectories="../../include"
4984+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
4985+ StringPooling="true"
4986+ RuntimeLibrary="2"
4987+ EnableFunctionLevelLinking="true"
4988+ TreatWChar_tAsBuiltInType="true"
4989+ ForceConformanceInForLoopScope="true"
4990+ UsePrecompiledHeader="0"
4991+ WarningLevel="3"
4992+ Detect64BitPortabilityProblems="false"
4993+ DebugInformationFormat="3"
4994+ />
4995+ <Tool
4996+ Name="VCManagedResourceCompilerTool"
4997+ />
4998+ <Tool
4999+ Name="VCResourceCompilerTool"
5000+ />
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: