summaryrefslogtreecommitdiff
path: root/tests/test_common/test_fixture.cpp
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-07-25 17:18:09 +0100
committerGitHub <noreply@github.com>2021-07-25 17:18:09 +0100
commitfc9fb2c77505cf1dcf5d1f50dd61a980471b3494 (patch)
tree3dce233f23dbe991c4dee0a63eb4dc0fe9c2b6f5 /tests/test_common/test_fixture.cpp
parentb69e7431aa2e22b4f4662c64e84ed242caac055e (diff)
Allow output of logging when running unit tests (#13556)
* Initial pass at enabling logging for unit tests * Add to docs * Bind debug for more test types * Force everything * Tidy up slightly
Diffstat (limited to 'tests/test_common/test_fixture.cpp')
-rw-r--r--tests/test_common/test_fixture.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_common/test_fixture.cpp b/tests/test_common/test_fixture.cpp
index 20ed838eb6..e041df7128 100644
--- a/tests/test_common/test_fixture.cpp
+++ b/tests/test_common/test_fixture.cpp
@@ -7,10 +7,10 @@
#include "action_tapping.h"
extern "C" {
+#include "debug.h"
+#include "eeconfig.h"
#include "action_layer.h"
-}
-extern "C" {
void set_time(uint32_t t);
void advance_time(uint32_t ms);
}
@@ -21,6 +21,10 @@ using testing::Between;
using testing::Return;
void TestFixture::SetUpTestCase() {
+ // The following is enough to bootstrap the values set in main
+ eeconfig_init_quantum();
+ eeconfig_update_debug(debug_config.raw);
+
TestDriver driver;
EXPECT_CALL(driver, send_keyboard_mock(_));
keyboard_init();