myserver-commit
[Top][All Lists]
Advanced

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

[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-185-


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-185-gde1e03f
Date: Fri, 23 Apr 2010 15:37:38 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  de1e03f67392000d5fa6af46bd8a61e028fe8cee (commit)
      from  9f4b84ec3a460ab500526b18d7d2649e8c5a3b46 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit de1e03f67392000d5fa6af46bd8a61e028fe8cee
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Apr 22 19:22:27 2010 +0200

    Add test for `getBacktrace'

diff --git a/myserver/include/base/exceptions/exceptions.h 
b/myserver/include/base/exceptions/exceptions.h
index cb74cb1..65c659b 100644
--- a/myserver/include/base/exceptions/exceptions.h
+++ b/myserver/include/base/exceptions/exceptions.h
@@ -71,7 +71,7 @@ class AbstractServerException: public exception
 
 # ifdef HAVE_BACKTRACE_SYMBOLS
           btString = (char **) gnulib::malloc (sizeof(char *) *w);
-          btString = backtrace_symbols(buffer, w);
+          btString = backtrace_symbols (buffer, w);
 # endif
         }
 
diff --git a/myserver/tests/test_exceptions.cpp 
b/myserver/tests/test_exceptions.cpp
index a6ad610..fa81b09 100644
--- a/myserver/tests/test_exceptions.cpp
+++ b/myserver/tests/test_exceptions.cpp
@@ -34,6 +34,7 @@ class TestExceptions : public CppUnit::TestFixture
   CPPUNIT_TEST (testWrongCloseDir);
   CPPUNIT_TEST (testWrongCwd);
   CPPUNIT_TEST (testErrno);
+  CPPUNIT_TEST (testGetBacktrace);
   CPPUNIT_TEST_SUITE_END ();
 
   DIR *foodir;
@@ -65,6 +66,22 @@ public:
       }
   }
 
+  void testGetBacktrace ()
+  {
+    try
+      {
+        errno = EINVAL;
+        checked::raiseException ();
+
+        CPPUNIT_FAIL ("Exception not raised");
+      }
+    catch (AbstractServerException & e)
+      {
+        char **bt = e.getBacktrace ();
+        CPPUNIT_ASSERT (bt);
+      }
+  }
+
   void testErrno ()
   {
     bool success = false;

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/exceptions/exceptions.h |    2 +-
 myserver/tests/test_exceptions.cpp            |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

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