diff options
author | Frédéric Blain <frederic.blain@valeo.com> | 2012-07-10 12:51:28 +0200 |
---|---|---|
committer | Timo Lotterbach <timo.lotterbach@bmw-carit.de> | 2012-07-20 00:07:16 -0700 |
commit | e427ee93fe81639ff849e4526c6e16c4b637fb04 (patch) | |
tree | 2c0d156c28f7f29940227064e8b6bfa2723ba397 /LayerManagerCommands | |
parent | d6f97f87d6296ebf7b099b2073721f6ab8d488f6 (diff) | |
download | layer_management-e427ee93fe81639ff849e4526c6e16c4b637fb04.tar.gz |
Unit tests for new IPC
This patch adds unit tests for the new IPC introduced by the Input Event framework. DBUSCommunicatorTest & IlmCommandTest have been completed.
Diffstat (limited to 'LayerManagerCommands')
4 files changed, 15 insertions, 3 deletions
diff --git a/LayerManagerCommands/include/SurfaceGetKeyboardFocusCommand.h b/LayerManagerCommands/include/SurfaceGetKeyboardFocusCommand.h index bfc2fe7..4507bb0 100644 --- a/LayerManagerCommands/include/SurfaceGetKeyboardFocusCommand.h +++ b/LayerManagerCommands/include/SurfaceGetKeyboardFocusCommand.h @@ -1,6 +1,6 @@ /*************************************************************************** * -* Copyright 2010,2011 BMW Car IT GmbH +* Copyright 2012 Valeo * * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -54,6 +54,10 @@ public: private: unsigned int* m_pSurfId; + + + // for unit testing + friend class GetKeyboardFocusSurfaceIdCommandEqMatcher; }; diff --git a/LayerManagerCommands/include/SurfaceSetKeyboardFocusCommand.h b/LayerManagerCommands/include/SurfaceSetKeyboardFocusCommand.h index 61b1d80..1a74e05 100644 --- a/LayerManagerCommands/include/SurfaceSetKeyboardFocusCommand.h +++ b/LayerManagerCommands/include/SurfaceSetKeyboardFocusCommand.h @@ -56,6 +56,10 @@ class SurfaceSetKeyboardFocusCommand : public BaseCommandSynchronous private: const unsigned int m_surfId; + + + // for unit testing + template <typename surfaceid_type> friend class SetKeyboardFocusOnCommandEqMatcherP; }; #endif /* ! _SURFACESETKEYBOARDFOCUSCOMMAND_H_ */ diff --git a/LayerManagerCommands/include/SurfaceUpdateInputEventAcceptance.h b/LayerManagerCommands/include/SurfaceUpdateInputEventAcceptance.h index 9ac308a..25a008c 100644 --- a/LayerManagerCommands/include/SurfaceUpdateInputEventAcceptance.h +++ b/LayerManagerCommands/include/SurfaceUpdateInputEventAcceptance.h @@ -72,6 +72,10 @@ class SurfaceUpdateInputEventAcceptance : public BaseCommandSynchronous const unsigned int m_surfId; const InputDevice m_devices; const bool m_accept; + + + // for unit testing + template <typename surfaceid_type, typename devices_type, typename acceptance_type> friend class UpdateInputEventAcceptanceOnCommandEqMatcherP3; }; #endif /* ! _SURFACEUPDATEINPUTEVENTACCEPTANCE_H_ */ diff --git a/LayerManagerCommands/src/SurfaceGetKeyboardFocusCommand.cpp b/LayerManagerCommands/src/SurfaceGetKeyboardFocusCommand.cpp index a59f9ed..6d65dd4 100644 --- a/LayerManagerCommands/src/SurfaceGetKeyboardFocusCommand.cpp +++ b/LayerManagerCommands/src/SurfaceGetKeyboardFocusCommand.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * -* Copyright 2010,2011 BMW Car IT GmbH +* Copyright 2012 Valeo * * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -48,7 +48,7 @@ ExecutionResult SurfaceGetKeyboardFocusCommand::execute(ICommandExecutor* execut } } } - + *m_pSurfId = (result == ExecutionSuccess) ? surfId : GraphicalObject::INVALID_ID; return result; } |