diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-06-08 09:51:49 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-06-08 09:51:49 +0000 |
commit | c4f221f990a6c6b95e3e21fe946c6706d0207fe2 (patch) | |
tree | dbc319d506321e815f942d46e77c29155ecc440c | |
parent | 4e29d7d42a6f6621c6f4c07ca0749a03d0b816af (diff) | |
download | ATCD-c4f221f990a6c6b95e3e21fe946c6706d0207fe2.tar.gz |
Mon Jun 8 09:51:05 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Bug_1890_Regression_Test.cpp:
* tests/Bug_2540_Regression_Test.cpp:
Put the reactors on the heap to get these tests running
with Windows CE where we only get a 64Kb main thread
-rw-r--r-- | ACE/ChangeLog | 7 | ||||
-rw-r--r-- | ACE/tests/Bug_1890_Regression_Test.cpp | 8 | ||||
-rw-r--r-- | ACE/tests/Bug_2540_Regression_Test.cpp | 10 |
3 files changed, 20 insertions, 5 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index a50b45b7e2a..63c052304e0 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,10 @@ +Mon Jun 8 09:51:05 2009 Johnny Willemsen <jwillemsen@remedy.nl> + + * tests/Bug_1890_Regression_Test.cpp: + * tests/Bug_2540_Regression_Test.cpp: + Put the reactors on the heap to get these tests running + with Windows CE where we only get a 64Kb main thread + Sun Jun 7 17:53:05 2009 Johnny Willemsen <jwillemsen@remedy.nl> * ace/Tokenizer_T.cpp diff --git a/ACE/tests/Bug_1890_Regression_Test.cpp b/ACE/tests/Bug_1890_Regression_Test.cpp index 3f489c5bad2..2d2cf98a3c8 100644 --- a/ACE/tests/Bug_1890_Regression_Test.cpp +++ b/ACE/tests/Bug_1890_Regression_Test.cpp @@ -16,6 +16,7 @@ #include "ace/Event_Handler.h" #include "ace/Reactor.h" #include "ace/Select_Reactor.h" +#include "ace/Auto_Ptr.h" ACE_RCSID (tests, Bug_1890_Regression_Test, @@ -105,8 +106,11 @@ run_main (int, ACE_TCHAR *[]) // Bug 1890 is all about ACE_Select_Reactor, so run it on that reactor // regardless of platform. - ACE_Select_Reactor select_reactor; - ACE_Reactor reactor (&select_reactor); + ACE_Select_Reactor *impl_ptr = 0; + ACE_NEW_RETURN (impl_ptr, ACE_Select_Reactor, -1); + auto_ptr<ACE_Select_Reactor> auto_impl (impl_ptr); + + ACE_Reactor reactor (impl_ptr); // Create the timer, this is the main driver for the test Timer * timer = new Timer; diff --git a/ACE/tests/Bug_2540_Regression_Test.cpp b/ACE/tests/Bug_2540_Regression_Test.cpp index 66f1f4f4ddb..2a05b97cb6d 100644 --- a/ACE/tests/Bug_2540_Regression_Test.cpp +++ b/ACE/tests/Bug_2540_Regression_Test.cpp @@ -16,6 +16,7 @@ #include "ace/Event_Handler.h" #include "ace/Reactor.h" #include "ace/Select_Reactor.h" +#include "ace/Auto_Ptr.h" ACE_RCSID (tests, Bug_2540_Regression_Test, @@ -70,7 +71,7 @@ private: * in a repeating interval. On the first @c initial_iterations the Timer * writes data through all of its handlers. On iteration @c initial_iteration * it triggers bug 2540 by removing two handlers from the reactor. - * + * */ class Timer : public ACE_Event_Handler { @@ -109,8 +110,11 @@ run_main (int, ACE_TCHAR *[]) // regardless of platform. In particular, this test relies on a handler // that doesn't consume ready-to-read data being called back - this won't // happen with ACE_WFMO_Reactor. - ACE_Select_Reactor select_reactor; - ACE_Reactor reactor (&select_reactor); + ACE_Select_Reactor *impl_ptr = 0; + ACE_NEW_RETURN (impl_ptr, ACE_Select_Reactor, -1); + auto_ptr<ACE_Select_Reactor> auto_impl (impl_ptr); + + ACE_Reactor reactor (impl_ptr); // Create the timer, this is the main driver for the test Timer * timer = new Timer; |