-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge branch 'yann/tests/eventqueue/fix-call' into develop
- Loading branch information
Showing
10 changed files
with
68 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Leka - LekaOS | ||
// Copyright 2022 APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "equeue_stub.h" | ||
#include "gmock/gmock.h" | ||
#include "stubs/leka/CoreEventQueue.h" | ||
#include "stubs/mbed/EventQueue_extension.h" | ||
|
||
namespace leka::mock { | ||
|
||
class EventQueue | ||
{ | ||
public: | ||
EventQueue() | ||
{ | ||
equeue_stub.void_ptr = &ptr; | ||
|
||
spy_CoreEventQueue_on_dispatch_forever_call = [] { equeue_stub.call_cb_immediately = true; }; | ||
spy_EventQueue_on_dispatch_forever_call = [] { equeue_stub.call_cb_immediately = true; }; | ||
} | ||
|
||
~EventQueue() | ||
{ | ||
equeue_stub.void_ptr = nullptr; | ||
equeue_stub.call_cb_immediately = false; | ||
} | ||
|
||
private: | ||
struct equeue_event ptr; | ||
}; | ||
|
||
} // namespace leka::mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Leka - LekaOS | ||
// Copyright 2021 APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#include <functional> | ||
|
||
namespace leka { | ||
|
||
extern std::function<void()> spy_EventQueue_on_dispatch_forever_call; | ||
|
||
} // namespace leka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters