OpenWalnut
1.5.0dev
|
Tests the WModuleConnector class. More...
#include <WModuleConnector_test.h>
Public Member Functions | |
void | setUp () |
Setup logger and other stuff for each test. More... | |
void | createModules (void) |
Initialized the test modules. More... | |
void | initModules (void) |
Initializes modules. More... | |
void | initConnections (void) |
Initialize some connections. More... | |
void | testModuleCreation (void) |
Test whether modules can be created without exception and proper initialization of connection lists. More... | |
void | testModuleInitialization (void) |
Test whether modules can be initialized without problems. More... | |
void | testModuleTwiceInitialization (void) |
Test whether module initialization is robust against double init. More... | |
void | testModuleConnectorCompatibility (void) |
Test whether automatic compatibility check works. More... | |
void | testModuleConnectorTypeCompatibility (void) |
Test whether automatic type compatibility check works. More... | |
void | testModuleConnection (void) |
Test whether connection works properly. More... | |
void | testModuleTwiceConnection (void) |
Test whether connecting twice is not possible. More... | |
void | testModuleDisconnect (void) |
Test whether the connection can properly be disconnected. More... | |
void | testModuleDisconnectAll (void) |
Test whether all connections can be removed in one step. More... | |
void | testModuleCleanup (void) |
Test whether module clean up is working properly. More... | |
void | testModulePropagateDataChange (void) |
Tests the propagation of data. More... | |
void | testModuleInvalidData (void) |
Tests several cases of unset data. More... | |
Public Attributes | |
std::shared_ptr< WModuleImpl > | m1 |
Simple module to test with. More... | |
std::shared_ptr< WModuleImpl > | m2 |
Simple module to test with. More... | |
std::shared_ptr< WModuleImpl > | m3 |
Simple module to test with. More... | |
Tests the WModuleConnector class.
We use WModuleConnector's direct derived classes WModuleInputConnector and WModuleOutputConnector to test their common functionality implemented in WModuleConnector (which has pure virtual members -> so can't be instantiated directly).
Definition at line 358 of file WModuleConnector_test.h.
|
inline |
Initialized the test modules.
Definition at line 387 of file WModuleConnector_test.h.
Referenced by testModuleCleanup(), testModuleConnection(), testModuleConnectorCompatibility(), testModuleConnectorTypeCompatibility(), testModuleCreation(), testModuleDisconnect(), testModuleDisconnectAll(), testModuleInitialization(), testModuleInvalidData(), testModulePropagateDataChange(), testModuleTwiceConnection(), and testModuleTwiceInitialization().
|
inline |
Initialize some connections.
Definition at line 408 of file WModuleConnector_test.h.
Referenced by testModuleCleanup(), testModuleConnection(), testModuleDisconnect(), testModuleDisconnectAll(), testModuleInvalidData(), testModulePropagateDataChange(), and testModuleTwiceConnection().
|
inline |
Initializes modules.
This is normally done by the module container.
Definition at line 398 of file WModuleConnector_test.h.
Referenced by testModuleCleanup(), testModuleConnection(), testModuleConnectorCompatibility(), testModuleConnectorTypeCompatibility(), testModuleDisconnect(), testModuleDisconnectAll(), testModuleInitialization(), testModuleInvalidData(), testModulePropagateDataChange(), testModuleTwiceConnection(), and testModuleTwiceInitialization().
|
inline |
Setup logger and other stuff for each test.
Definition at line 364 of file WModuleConnector_test.h.
References WLogger::startup().
|
inline |
Test whether module clean up is working properly.
Definition at line 597 of file WModuleConnector_test.h.
References createModules(), initConnections(), initModules(), and m1.
|
inline |
Test whether connection works properly.
Definition at line 517 of file WModuleConnector_test.h.
References createModules(), initConnections(), initModules(), m1, and m2.
|
inline |
Test whether automatic compatibility check works.
Definition at line 470 of file WModuleConnector_test.h.
References createModules(), WException::disableBacktrace(), initModules(), m1, and m2.
|
inline |
Test whether automatic type compatibility check works.
Definition at line 491 of file WModuleConnector_test.h.
References createModules(), WException::disableBacktrace(), initModules(), m1, and m2.
|
inline |
Test whether modules can be created without exception and proper initialization of connection lists.
Definition at line 418 of file WModuleConnector_test.h.
References createModules(), and m1.
|
inline |
Test whether the connection can properly be disconnected.
Definition at line 552 of file WModuleConnector_test.h.
References createModules(), initConnections(), initModules(), m1, and m2.
|
inline |
Test whether all connections can be removed in one step.
Definition at line 574 of file WModuleConnector_test.h.
References createModules(), initConnections(), initModules(), m1, m2, and m3.
|
inline |
Test whether modules can be initialized without problems.
Definition at line 432 of file WModuleConnector_test.h.
References createModules(), initModules(), m1, m2, and m3.
|
inline |
Tests several cases of unset data.
Definition at line 632 of file WModuleConnector_test.h.
References createModules(), WException::disableBacktrace(), initConnections(), initModules(), m2, and m3.
|
inline |
Tests the propagation of data.
Definition at line 611 of file WModuleConnector_test.h.
References createModules(), initConnections(), initModules(), m1, and m2.
|
inline |
Test whether connecting twice is not possible.
Definition at line 534 of file WModuleConnector_test.h.
References createModules(), initConnections(), initModules(), m1, and m2.
|
inline |
Test whether module initialization is robust against double init.
Definition at line 455 of file WModuleConnector_test.h.
References createModules(), WException::disableBacktrace(), initModules(), and m1.
std::shared_ptr< WModuleImpl > WModuleConnectorTest::m1 |
Simple module to test with.
Definition at line 372 of file WModuleConnector_test.h.
Referenced by createModules(), initConnections(), initModules(), testModuleCleanup(), testModuleConnection(), testModuleConnectorCompatibility(), testModuleConnectorTypeCompatibility(), testModuleCreation(), testModuleDisconnect(), testModuleDisconnectAll(), testModuleInitialization(), testModulePropagateDataChange(), testModuleTwiceConnection(), and testModuleTwiceInitialization().
std::shared_ptr< WModuleImpl > WModuleConnectorTest::m2 |
Simple module to test with.
Definition at line 377 of file WModuleConnector_test.h.
Referenced by createModules(), initConnections(), initModules(), testModuleConnection(), testModuleConnectorCompatibility(), testModuleConnectorTypeCompatibility(), testModuleDisconnect(), testModuleDisconnectAll(), testModuleInitialization(), testModuleInvalidData(), testModulePropagateDataChange(), and testModuleTwiceConnection().
std::shared_ptr< WModuleImpl > WModuleConnectorTest::m3 |
Simple module to test with.
Definition at line 382 of file WModuleConnector_test.h.
Referenced by createModules(), initModules(), testModuleDisconnectAll(), testModuleInitialization(), and testModuleInvalidData().