summaryrefslogtreecommitdiff
path: root/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp
diff options
context:
space:
mode:
authorThierry Carré2012-10-16 12:45:48 +0200
committerThierry Carré2013-01-31 15:04:48 +0100
commit4452a8abe0d135b1f690b530a3bb4b1e495d7b65 (patch)
treeffa06423693d00cdaccd3d8a51d3c6c61ec2b2f3 /cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp
parent83441de4ab01355295cfe6a6e389ad5bc66fd361 (diff)
cesar/maximus: C++ maximus refactoring, closes #3336, closes #3098
Feedback on new performance on tests inside: test_general/station Ratio = Test duration before this commit divided by new duration. |--------------------------------------------|-------| | Unit test | Ratio | |--------------------------------------------|-------| | maximus/py/sc01_long_simu.py | 6.5 | | maximus/py/sc02_long_simu.py | 4.5 | | scenario/av/py/sc01_assoc_auth.py | 3.3 | | scenario/av/py/sc02_stas_communication.py | 4.5 | | scenario/av/py/sc03_two_avln_coexisting.py | 2.1 | | scenario/av/py/sc04_cc_whoru.py | 2.1 | | scenario/av/py/sc05_cc_leave.py | 2.3 | | scenario/av/py/sc06_discover_procedure.py | 2.3 | | scenario/av/py/sc07_bridge.py | 2.2 | | scenario/av/py/sc08_bentry_change.py | 2.1 | | scenario/av/py/sc09_simple_connect.py | 2.2 | | scenario/av/py/sc10_short_messages.py | 5.7 | | scenario/av/py/sc11_cm_nw_info.py | 4.7 | | scenario/av/py/sc12_change_nmk.py | 5.5 | | scenario/av/py/sc14_igmp.py | 4.0 | | scenario/av/py/sc15_hide.py | 6.0 | | compliance/py/sc01_dut_as_a_cco.py | 5.8 | | tonemap/py/sc01_bl_initial.py | 2.3 | | tonemap/py/sc02_vs_get_tonemap.py | 2.3 | |--------------------------------------------|-------| | Average speed improvement of Maximus is | 4.9 | |--------------------------------------------|-------| Many tickets have been opened to continue the refactoring. Titles begin by "[Maximus][Refactoring]" in pessac's trac. For this reason #3336 is close. #3098 is really fixed.
Diffstat (limited to 'cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp')
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp128
1 files changed, 0 insertions, 128 deletions
diff --git a/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp b/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp
deleted file mode 100644
index e37d0f209d..0000000000
--- a/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-
-#include "FunctionCallManagerTest.h"
-
-#include "FunctionCallManager.h"
-#include "SciServer.h"
-#include "FunctionSciMsg.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (FunctionCallManagerTest);
-
-
-void FunctionCallManagerTest::setUp (void)
-{
- logTest();
-
- try
- {
- mpSciServer = new SciServer();
- mpFunctionCallManager = new FunctionCallManager(mpSciServer);
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void FunctionCallManagerTest::tearDown (void)
-{
- logTest();
-
- try
- {
- if (NULL != mpFunctionCallManager)
- {
- delete (mpFunctionCallManager);
- mpFunctionCallManager = NULL;
- }
- if (NULL != mpSciServer)
- {
- delete (mpSciServer);
- mpSciServer = NULL;
- }
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void FunctionCallManagerTest::registerCallbackTest (void)
-{
- logTest();
-
- try
- {
- if (NULL != mpFunctionCallManager)
- {
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(1, &userFunction1) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(2, &userFunction2) );
- }
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void FunctionCallManagerTest::receiveMsgTest (void)
-{
- logTest();
-
- try
- {
- if (NULL != mpFunctionCallManager)
- {
- FunctionSciMsg functionSciMsg(mpFunctionCallManager);
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(functionSciMsg.getSpecializedSciMsgHeader().msg_id, &userFunction1) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(2, &userFunction2) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(3, &userFunction3) );
-
- CPPUNIT_ASSERT_MESSAGE ( "setFunctionName failed",
- functionSciMsg.setFunctionName ("userFunction1") );
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg failed",
- mpFunctionCallManager->receiveMsg (functionSciMsg) );
- }
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void userFunction1 ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-
-
-void userFunction2 ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-
-
-void userFunction3 ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-