Skip to content

Commit

Permalink
tests/core/irq_cpp: remove irq.h override
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrolanzieri committed Jun 15, 2024
1 parent 1eb6667 commit 78413fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 33 deletions.
30 changes: 0 additions & 30 deletions tests/core/irq_cpp/irq.h

This file was deleted.

15 changes: 12 additions & 3 deletions tests/core/irq_cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,27 @@
* @author Jens Wetterich <[email protected]>
*/

#include <stdbool.h>

/* prevent the inclusion of irq.h on irq.hpp */
#define IRQ_H
unsigned irq_disable(void);
unsigned irq_enable(void);
bool irq_is_enabled(void);
bool irq_is_in(void);
void irq_restore(unsigned state);

#define FFF_ARG_HISTORY_LEN 1u
#define FFF_CALL_HISTORY_LEN 1u
#include "cppunit.hpp"
#include "fff.h"
#include "irq.h"
#include "irq.hpp"
DEFINE_FFF_GLOBALS

FAKE_VALUE_FUNC(unsigned, irq_disable)
FAKE_VALUE_FUNC(unsigned, irq_enable)
FAKE_VALUE_FUNC(int, irq_is_enabled)
FAKE_VALUE_FUNC(int, irq_is_in)
FAKE_VALUE_FUNC(bool, irq_is_enabled)
FAKE_VALUE_FUNC(bool, irq_is_in)
FAKE_VOID_FUNC(irq_restore, unsigned)

class irq_suite : public riot::testing::test_suite {
Expand Down

0 comments on commit 78413fe

Please sign in to comment.