camino-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Camino-devel] camino/src .cvsignore unittests.pro common/Test...


From: Philippe Fremy
Subject: [Camino-devel] camino/src .cvsignore unittests.pro common/Test...
Date: Tue, 21 Jan 2003 17:32:57 -0500

CVSROOT:        /cvsroot/camino
Module name:    camino
Changes by:     Philippe Fremy <address@hidden> 03/01/21 17:32:57

Modified files:
        src            : .cvsignore unittests.pro 
        src/common     : TestTile.cpp 
        src/cppunit/include/cppunit/extensions: Orthodox.h 
        src/cppunit/include/cppunit/ui/text: TestRunner.h 

Log message:
        more ignore files

Patches:
Index: camino/src/.cvsignore
diff -u camino/src/.cvsignore:1.2 camino/src/.cvsignore:1.3
--- camino/src/.cvsignore:1.2   Wed Jan 15 17:05:06 2003
+++ camino/src/.cvsignore       Tue Jan 21 17:32:57 2003
@@ -2,7 +2,8 @@
 Debug
 Release
 camino
-unittest
+unittest*.*
+unittests
 *.o
 *.plg
 *.dsp
Index: camino/src/common/TestTile.cpp
diff -u camino/src/common/TestTile.cpp:1.1 camino/src/common/TestTile.cpp:1.2
--- camino/src/common/TestTile.cpp:1.1  Thu Jan 16 17:45:43 2003
+++ camino/src/common/TestTile.cpp      Tue Jan 21 17:32:57 2003
@@ -1,55 +1,55 @@
-/****************************************************************
-**
-** Camino
-**
-** Version : $Id: TestTile.cpp,v 1.1 2003/01/16 22:45:43 Audoux Exp $
-**
-** Author(s) : Philippe Fremy, Pascal Audoux
-** Creation : 14/01/2003
-** Copyright: Pascal Audoux, Philippe Fremy 2003
-**
-** Licence :    
-**     This program is free software; you can redistribute it and/or modify
-**     it under the terms of the GNU General Public License as published by
-**             the Free Software Foundation; either version 2, or (at your 
option)
-**      any later version.
-**
-**     This program is distributed in the hope that it will be useful,
-**     but WITHOUT ANY WARRANTY; without even the implied warranty of
-**     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-**     GNU General Public License for more details.
-**
-****************************************************************/
-
-#include "TestTemplate.h"
-#include "Template.h"
-
-// register the suite so that it is run in the runner
-CPPUNIT_TEST_SUITE_REGISTRATION( TestTemplate );
-
-void TestTemplate::setUp()
-{
-       // add initialisation for every tests
-}
-
-void TestTemplate::tearDown()
-{
-       // add finilisation for every test
-}
-
-void TestTemplate::testBof()
-{
-       // do something
-       CPPUNIT_ASSERT( /* some assertion */ 1 );
-       CPPUNIT_FAIL( "The exception was not raised!" );
-}
-
-void TestTemplate::testHop()
-{
-       // do something
-       CPPUNIT_ASSERT_EQUAL( 1, 1 );
-       CPPUNIT_ASSERT_MESSAGE( "This is a custom message" , /* some_assertion 
*/ 1 );
-       CPPUNIT_ASSERT_EQUAL( (char *) "aslfdjalsfj", (char *) "hop" );
-       CPPUNIT_ASSERT_EQUAL_MESSAGE( "This is a custom message for a failed 
equality!", 3, 2 );
-}
-
+/****************************************************************
+**
+** Camino
+**
+** Version : $Id: TestTile.cpp,v 1.2 2003/01/21 22:32:57 pfremy Exp $
+**
+** Author(s) : Philippe Fremy, Pascal Audoux
+** Creation : 14/01/2003
+** Copyright: Pascal Audoux, Philippe Fremy 2003
+**
+** Licence :    
+**     This program is free software; you can redistribute it and/or modify
+**     it under the terms of the GNU General Public License as published by
+**             the Free Software Foundation; either version 2, or (at your 
option)
+**      any later version.
+**
+**     This program is distributed in the hope that it will be useful,
+**     but WITHOUT ANY WARRANTY; without even the implied warranty of
+**     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**     GNU General Public License for more details.
+**
+****************************************************************/
+
+#include "TestTemplate.h"
+#include "Template.h"
+
+// register the suite so that it is run in the runner
+CPPUNIT_TEST_SUITE_REGISTRATION( TestTemplate );
+
+void TestTemplate::setUp()
+{
+       // add initialisation for every tests
+}
+
+void TestTemplate::tearDown()
+{
+       // add finilisation for every test
+}
+
+void TestTemplate::testBof()
+{
+       // do something
+       CPPUNIT_ASSERT( /* some assertion */ 1 );
+       CPPUNIT_FAIL( "The exception was not raised!" );
+}
+
+void TestTemplate::testHop()
+{
+       // do something
+       CPPUNIT_ASSERT_EQUAL( 1, 1 );
+       CPPUNIT_ASSERT_MESSAGE( "This is a custom message" , /* some_assertion 
*/ 1 );
+       CPPUNIT_ASSERT_EQUAL( (char *) "aslfdjalsfj", (char *) "hop" );
+       CPPUNIT_ASSERT_EQUAL_MESSAGE( "This is a custom message for a failed 
equality!", 3, 2 );
+}
+
Index: camino/src/cppunit/include/cppunit/extensions/Orthodox.h
diff -u camino/src/cppunit/include/cppunit/extensions/Orthodox.h:1.1 
camino/src/cppunit/include/cppunit/extensions/Orthodox.h:1.2
--- camino/src/cppunit/include/cppunit/extensions/Orthodox.h:1.1        Sun Jan 
19 09:00:44 2003
+++ camino/src/cppunit/include/cppunit/extensions/Orthodox.h    Tue Jan 21 
17:32:57 2003
@@ -1,93 +1,93 @@
-#ifndef CPPUNIT_EXTENSIONS_ORTHODOX_H
-#define CPPUNIT_EXTENSIONS_ORTHODOX_H
-
-#include <cppunit/TestCase.h>
-
-namespace CppUnit {
-
-/*
- * Orthodox performs a simple set of tests on an arbitary
- * class to make sure that it supports at least the
- * following operations:
- *
- *      default construction    - constructor
- *      equality/inequality     - operator== && operator!=
- *      assignment              - operator=
- *      negation                - operator!
- *      safe passage            - copy construction
- *
- * If operations for each of these are not declared
- * the template will not instantiate.  If it does 
- * instantiate, tests are performed to make sure
- * that the operations have correct semantics.
- *      
- * Adding an orthodox test to a suite is very 
- * easy: 
- * 
- * public: Test *suite ()  {
- *     TestSuite *suiteOfTests = new TestSuite;
- *     suiteOfTests->addTest (new ComplexNumberTest ("testAdd");
- *     suiteOfTests->addTest (new TestCaller<Orthodox<Complex> > ());
- *     return suiteOfTests;
- *  }
- *
- * Templated test cases be very useful when you are want to
- * make sure that a group of classes have the same form.
- *
- * see TestSuite
- */
-
-
-template <typename ClassUnderTest> class Orthodox : public TestCase
-{
-public:
-                    Orthodox () : TestCase ("Orthodox") {}
-
-protected:
-    ClassUnderTest  call (ClassUnderTest object);
-    void            runTest ();
-
-
-};
-
-
-// Run an orthodoxy test
-template <typename ClassUnderTest> void Orthodox<ClassUnderTest>::runTest ()
-{
-    // make sure we have a default constructor
-    ClassUnderTest   a, b, c;
-
-    // make sure we have an equality operator
-    CPPUNIT_ASSERT (a == b);
-
-    // check the inverse
-    b.operator= (a.operator! ());
-    CPPUNIT_ASSERT (a != b);
-
-    // double inversion
-    b = !!a;
-    CPPUNIT_ASSERT (a == b);
-
-    // invert again
-    b = !a;
-
-    // check calls
-    c = a;
-    CPPUNIT_ASSERT (c == call (a));
-
-    c = b;
-    CPPUNIT_ASSERT (c == call (b));
-
-}
-
-
-// Exercise a call
-template <typename ClassUnderTest> 
-ClassUnderTest Orthodox<ClassUnderTest>::call (ClassUnderTest object)
-{
-    return object;
-}
-
-} // namespace CppUnit
-
-#endif
+#ifndef CPPUNIT_EXTENSIONS_ORTHODOX_H
+#define CPPUNIT_EXTENSIONS_ORTHODOX_H
+
+#include <cppunit/TestCase.h>
+
+namespace CppUnit {
+
+/*
+ * Orthodox performs a simple set of tests on an arbitary
+ * class to make sure that it supports at least the
+ * following operations:
+ *
+ *      default construction    - constructor
+ *      equality/inequality     - operator== && operator!=
+ *      assignment              - operator=
+ *      negation                - operator!
+ *      safe passage            - copy construction
+ *
+ * If operations for each of these are not declared
+ * the template will not instantiate.  If it does 
+ * instantiate, tests are performed to make sure
+ * that the operations have correct semantics.
+ *      
+ * Adding an orthodox test to a suite is very 
+ * easy: 
+ * 
+ * public: Test *suite ()  {
+ *     TestSuite *suiteOfTests = new TestSuite;
+ *     suiteOfTests->addTest (new ComplexNumberTest ("testAdd");
+ *     suiteOfTests->addTest (new TestCaller<Orthodox<Complex> > ());
+ *     return suiteOfTests;
+ *  }
+ *
+ * Templated test cases be very useful when you are want to
+ * make sure that a group of classes have the same form.
+ *
+ * see TestSuite
+ */
+
+
+template <typename ClassUnderTest> class Orthodox : public TestCase
+{
+public:
+                    Orthodox () : TestCase ("Orthodox") {}
+
+protected:
+    ClassUnderTest  call (ClassUnderTest object);
+    void            runTest ();
+
+
+};
+
+
+// Run an orthodoxy test
+template <typename ClassUnderTest> void Orthodox<ClassUnderTest>::runTest ()
+{
+    // make sure we have a default constructor
+    ClassUnderTest   a, b, c;
+
+    // make sure we have an equality operator
+    CPPUNIT_ASSERT (a == b);
+
+    // check the inverse
+    b.operator= (a.operator! ());
+    CPPUNIT_ASSERT (a != b);
+
+    // double inversion
+    b = !!a;
+    CPPUNIT_ASSERT (a == b);
+
+    // invert again
+    b = !a;
+
+    // check calls
+    c = a;
+    CPPUNIT_ASSERT (c == call (a));
+
+    c = b;
+    CPPUNIT_ASSERT (c == call (b));
+
+}
+
+
+// Exercise a call
+template <typename ClassUnderTest> 
+ClassUnderTest Orthodox<ClassUnderTest>::call (ClassUnderTest object)
+{
+    return object;
+}
+
+} // namespace CppUnit
+
+#endif
Index: camino/src/cppunit/include/cppunit/ui/text/TestRunner.h
diff -u camino/src/cppunit/include/cppunit/ui/text/TestRunner.h:1.1 
camino/src/cppunit/include/cppunit/ui/text/TestRunner.h:1.2
--- camino/src/cppunit/include/cppunit/ui/text/TestRunner.h:1.1 Sun Jan 19 
09:00:44 2003
+++ camino/src/cppunit/include/cppunit/ui/text/TestRunner.h     Tue Jan 21 
17:32:57 2003
@@ -1,103 +1,103 @@
-#ifndef CPPUNITUI_TEXT_TESTRUNNER_H
-#define CPPUNITUI_TEXT_TESTRUNNER_H
-
-#include <cppunit/Portability.h>
-#include <string>
-#include <vector>
-
-namespace CppUnit {
-
-class Outputter;
-class Test;
-class TestSuite;
-class TextOutputter;
-class TestResult;
-class TestResultCollector;
-
-namespace TextUi
-{
-
-/*!
- * \brief A text mode test runner.
- * \ingroup WritingTestResult
- * \ingroup ExecutingTest
- *
- * The test runner manage the life cycle of the added tests.
- *
- * The test runner can run only one of the added tests or all the tests. 
- *
- * TestRunner prints out a trace as the tests are executed followed by a
- * summary at the end. The trace and summary print are optional.
- *
- * Here is an example of use:
- *
- * \code
- * CppUnit::TextUi::TestRunner runner;
- * runner.addTest( ExampleTestCase::suite() );
- * runner.run( "", true );    // Run all tests and wait
- * \endcode
- *
- * The trace is printed using a TextTestProgressListener. The summary is 
printed
- * using a TextOutputter. 
- *
- * You can specify an alternate Outputter at construction
- * or later with setOutputter(). 
- *
- * After construction, you can register additional TestListener to 
eventManager(),
- * for a custom progress trace, for example.
- *
- * \code
- * CppUnit::TextUi::TestRunner runner;
- * runner.addTest( ExampleTestCase::suite() );
- * runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter( 
- *                          &runner.result(),
- *                          std::cerr ) );
- * MyCustomProgressTestListener progress;
- * runner.eventManager().addListener( &progress );
- * runner.run( "", true );    // Run all tests and wait
- * \endcode
- *
- * \see CompilerOutputter, XmlOutputter, TextOutputter.
- */
-class CPPUNIT_API TestRunner
-{
-public:
-  TestRunner( Outputter *outputter =NULL );
-
-  virtual ~TestRunner();
-
-  bool run( std::string testName ="",
-            bool doWait = false,
-            bool doPrintResult = true,
-            bool doPrintProgress = true );
-
-  void addTest( Test *test );
-
-  void setOutputter( Outputter *outputter );
-
-  TestResultCollector &result() const;
-
-  TestResult &eventManager() const;
-
-protected:
-  virtual bool runTest( Test *test,
-                        bool doPrintProgress );
-  virtual bool runTestByName( std::string testName,
-                              bool printProgress );
-  virtual void wait( bool doWait );
-  virtual void printResult( bool doPrintResult );
-
-  virtual Test *findTestByName( std::string name ) const;
-
-  TestSuite *m_suite;
-  TestResultCollector *m_result;
-  TestResult *m_eventManager;
-  Outputter *m_outputter;
-};
-
-
-} // namespace TextUi
-
-} // namespace CppUnit
-
-#endif  // CPPUNITUI_TEXT_TESTRUNNER_H
+#ifndef CPPUNITUI_TEXT_TESTRUNNER_H
+#define CPPUNITUI_TEXT_TESTRUNNER_H
+
+#include <cppunit/Portability.h>
+#include <string>
+#include <vector>
+
+namespace CppUnit {
+
+class Outputter;
+class Test;
+class TestSuite;
+class TextOutputter;
+class TestResult;
+class TestResultCollector;
+
+namespace TextUi
+{
+
+/*!
+ * \brief A text mode test runner.
+ * \ingroup WritingTestResult
+ * \ingroup ExecutingTest
+ *
+ * The test runner manage the life cycle of the added tests.
+ *
+ * The test runner can run only one of the added tests or all the tests. 
+ *
+ * TestRunner prints out a trace as the tests are executed followed by a
+ * summary at the end. The trace and summary print are optional.
+ *
+ * Here is an example of use:
+ *
+ * \code
+ * CppUnit::TextUi::TestRunner runner;
+ * runner.addTest( ExampleTestCase::suite() );
+ * runner.run( "", true );    // Run all tests and wait
+ * \endcode
+ *
+ * The trace is printed using a TextTestProgressListener. The summary is 
printed
+ * using a TextOutputter. 
+ *
+ * You can specify an alternate Outputter at construction
+ * or later with setOutputter(). 
+ *
+ * After construction, you can register additional TestListener to 
eventManager(),
+ * for a custom progress trace, for example.
+ *
+ * \code
+ * CppUnit::TextUi::TestRunner runner;
+ * runner.addTest( ExampleTestCase::suite() );
+ * runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter( 
+ *                          &runner.result(),
+ *                          std::cerr ) );
+ * MyCustomProgressTestListener progress;
+ * runner.eventManager().addListener( &progress );
+ * runner.run( "", true );    // Run all tests and wait
+ * \endcode
+ *
+ * \see CompilerOutputter, XmlOutputter, TextOutputter.
+ */
+class CPPUNIT_API TestRunner
+{
+public:
+  TestRunner( Outputter *outputter =NULL );
+
+  virtual ~TestRunner();
+
+  bool run( std::string testName ="",
+            bool doWait = false,
+            bool doPrintResult = true,
+            bool doPrintProgress = true );
+
+  void addTest( Test *test );
+
+  void setOutputter( Outputter *outputter );
+
+  TestResultCollector &result() const;
+
+  TestResult &eventManager() const;
+
+protected:
+  virtual bool runTest( Test *test,
+                        bool doPrintProgress );
+  virtual bool runTestByName( std::string testName,
+                              bool printProgress );
+  virtual void wait( bool doWait );
+  virtual void printResult( bool doPrintResult );
+
+  virtual Test *findTestByName( std::string name ) const;
+
+  TestSuite *m_suite;
+  TestResultCollector *m_result;
+  TestResult *m_eventManager;
+  Outputter *m_outputter;
+};
+
+
+} // namespace TextUi
+
+} // namespace CppUnit
+
+#endif  // CPPUNITUI_TEXT_TESTRUNNER_H
Index: camino/src/unittests.pro
diff -u camino/src/unittests.pro:1.5 camino/src/unittests.pro:1.6
--- camino/src/unittests.pro:1.5        Tue Jan 21 17:26:33 2003
+++ camino/src/unittests.pro    Tue Jan 21 17:32:57 2003
@@ -19,9 +19,7 @@
 
 # common
 HEADERS += common/TestMsgDecoder.h 
-# common/TestNetMsg.h common/TestMsgCoder.h 
 SOURCES += common/TestMsgDecoder.cpp 
-# common/TestNetMsg.cpp common/TestMsgCoder.cpp 
 
 HEADERS += common/PhilAsserts.h common/PhilTestRunner.h
 SOURCES += common/PhilAsserts.cpp common/PhilTestRunner.cpp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]