X-Git-Url: http://developer.intra2net.com/git/?a=blobdiff_plain;f=test%2Freentrant.cpp;h=c69facc67eddc5a6c488e233a322df7074111f71;hb=3d9c0861e86edcbfad10b84da332093fd6438f32;hp=c60baaed500518354cea166949fb8c8b751b18e4;hpb=696c95c2808d6f88df2b348f9e77fc66c9068976;p=libt2n diff --git a/test/reentrant.cpp b/test/reentrant.cpp index c60baae..c69facc 100644 --- a/test/reentrant.cpp +++ b/test/reentrant.cpp @@ -1,9 +1,24 @@ -/*************************************************************************** - * Copyright (C) 2004 by Intra2net AG * - * info@intra2net.com * - * * - ***************************************************************************/ +/* +Copyright (C) 2004 by Intra2net AG +The software in this package is distributed under the GNU General +Public License version 2 (with a special exception described below). + +A copy of GNU General Public License (GPL) is included in this distribution, +in the file COPYING.GPL. + +As a special exception, if other files instantiate templates or use macros +or inline functions from this file, or you compile this file and link it +with other works to produce a work based on this file, this file +does not by itself cause the resulting work to be covered +by the GNU General Public License. + +However the source code for this file must still be made available +in accordance with section (3) of the GNU General Public License. + +This exception does not invalidate any other reasons why a work based +on this file might be covered by the GNU General Public License. +*/ #include #include #include @@ -35,7 +50,7 @@ using namespace std; using namespace CppUnit; using namespace libt2n; -namespace +namespace reentrant { command_server *global_server = NULL; @@ -124,8 +139,10 @@ class testfunc_cmd : public libt2n::command #include -BOOST_CLASS_EXPORT(testfunc_cmd) -BOOST_CLASS_EXPORT(testfunc_res) +BOOST_CLASS_EXPORT(reentrant::testfunc_cmd) +BOOST_CLASS_EXPORT(reentrant::testfunc_res) + +using namespace reentrant; class test_reentrant : public TestFixture { @@ -188,6 +205,9 @@ class test_reentrant : public TestFixture } catch (exception &e) { cerr << "caught exception: " << e.what() << endl; + } catch(...) + { + std::cerr << "exception in child. ignoring\n"; } // don't call atexit and stuff