Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc9fb2c775 | ||
|
|
b69e7431aa |
No files matched your search
+11
-2
@@ -24,7 +24,6 @@ GTEST_INTERNAL_INC :=\
|
|||||||
|
|
||||||
$(GTEST_OUTPUT)_SRC :=\
|
$(GTEST_OUTPUT)_SRC :=\
|
||||||
googletest/src/gtest-all.cc\
|
googletest/src/gtest-all.cc\
|
||||||
googletest/src/gtest_main.cc\
|
|
||||||
googlemock/src/gmock-all.cc
|
googlemock/src/gmock-all.cc
|
||||||
|
|
||||||
$(GTEST_OUTPUT)_DEFS :=
|
$(GTEST_OUTPUT)_DEFS :=
|
||||||
@@ -35,7 +34,8 @@ CREATE_MAP := no
|
|||||||
|
|
||||||
VPATH +=\
|
VPATH +=\
|
||||||
$(LIB_PATH)/googletest\
|
$(LIB_PATH)/googletest\
|
||||||
$(LIB_PATH)/googlemock
|
$(LIB_PATH)/googlemock\
|
||||||
|
$(LIB_PATH)/printf
|
||||||
|
|
||||||
all: elf
|
all: elf
|
||||||
|
|
||||||
@@ -43,6 +43,10 @@ VPATH += $(COMMON_VPATH)
|
|||||||
PLATFORM:=TEST
|
PLATFORM:=TEST
|
||||||
PLATFORM_KEY:=test
|
PLATFORM_KEY:=test
|
||||||
|
|
||||||
|
ifeq ($(strip $(DEBUG)), 1)
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||||
include tests/$(TEST)/rules.mk
|
include tests/$(TEST)/rules.mk
|
||||||
endif
|
endif
|
||||||
@@ -55,6 +59,11 @@ ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
|||||||
include build_full_test.mk
|
include build_full_test.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
$(TEST)_SRC += \
|
||||||
|
tests/test_common/main.c \
|
||||||
|
$(LIB_PATH)/printf/printf.c \
|
||||||
|
$(COMMON_DIR)/printf.c
|
||||||
|
|
||||||
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
|
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
|
||||||
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
|
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
|
||||||
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
|
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ For compatible platforms, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) can
|
|||||||
|
|
||||||
Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provided by PJRC, can also be used to display debug messages. Prebuilt binaries for Windows,Linux,and MacOS are available.
|
Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provided by PJRC, can also be used to display debug messages. Prebuilt binaries for Windows,Linux,and MacOS are available.
|
||||||
|
|
||||||
## Sending Your Own Debug Messages
|
## Sending Your Own Debug Messages :id=debug-api
|
||||||
|
|
||||||
Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:
|
Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:
|
||||||
|
|
||||||
|
|||||||
@@ -36,12 +36,20 @@ Note how there's several different tests, each mocking out a separate part. Also
|
|||||||
|
|
||||||
## Running the Tests
|
## Running the Tests
|
||||||
|
|
||||||
To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
|
To run all the tests in the codebase, type `make test:all`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
|
||||||
|
|
||||||
## Debugging the Tests
|
## Debugging the Tests
|
||||||
|
|
||||||
If there are problems with the tests, you can find the executable in the `./build/test` folder. You should be able to run those with GDB or a similar debugger.
|
If there are problems with the tests, you can find the executable in the `./build/test` folder. You should be able to run those with GDB or a similar debugger.
|
||||||
|
|
||||||
|
To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example
|
||||||
|
|
||||||
|
```console
|
||||||
|
make test:all DEBUG=1
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, add `CONSOLE_ENABLE=yes` to the tests `rules.mk`.
|
||||||
|
|
||||||
## Full Integration Tests
|
## Full Integration Tests
|
||||||
|
|
||||||
It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.
|
It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.
|
||||||
|
|||||||
+16
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2017 Zach White <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
File renamed without changes.
+16
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2017 Zach White <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,52 @@
|
|||||||
|
/* Copyright 2017 Zach White <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
#define _CL 2
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: Base Layer (Default Layer)
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT_66_ansi(
|
||||||
|
KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_PGUP, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \
|
||||||
|
KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
|
||||||
|
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
*/
|
||||||
|
[_FL] = LAYOUT_66_ansi(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_VOLU, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \
|
||||||
|
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_PGUP, \
|
||||||
|
_______,_______,_______, _______, _______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END),
|
||||||
|
|
||||||
|
/* Keymap _CL: Control layer
|
||||||
|
*/
|
||||||
|
[_CL] = LAYOUT_66_ansi(
|
||||||
|
BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, RGB_TOG, RGB_VAI, \
|
||||||
|
_______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \
|
||||||
|
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \
|
||||||
|
_______,_______,_______, RGB_MOD, _______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI),
|
||||||
|
};
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# Basic Clueboard 66% Hotswap Layout
|
||||||
|
|
||||||
|
This is the default layout that comes flashed on every Clueboard. For the most
|
||||||
|
part it's a straightforward and easy to follow layout. The only unusual key is
|
||||||
|
the key in the upper left, which sends Escape normally, but Grave when any of
|
||||||
|
the Ctrl, Alt, or GUI modifiers are held down.
|
||||||
|
|
||||||
|
This uses `LAYOUT_66_ansi`, which is compatable with the `66_ansi` community
|
||||||
|
layout.
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
/* Copyright 2017 Zach White <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
#define _CL 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
S_BSKTC = SAFE_RANGE,
|
||||||
|
S_ODEJY,
|
||||||
|
S_RCKBY,
|
||||||
|
S_DOEDR,
|
||||||
|
S_SCALE,
|
||||||
|
S_ONEUP,
|
||||||
|
S_COIN,
|
||||||
|
S_SONIC,
|
||||||
|
S_ZELDA
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float song_basketcase[][2] = SONG(BASKET_CASE);
|
||||||
|
float song_ode_to_joy[][2] = SONG(ODE_TO_JOY);
|
||||||
|
float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY);
|
||||||
|
float song_doe_a_deer[][2] = SONG(DOE_A_DEER);
|
||||||
|
float song_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
|
float song_coin[][2] = SONG(COIN_SOUND);
|
||||||
|
float song_one_up[][2] = SONG(ONE_UP_SOUND);
|
||||||
|
float song_sonic_ring[][2] = SONG(SONIC_RING);
|
||||||
|
float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: Base Layer (Default Layer)
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT(
|
||||||
|
KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_PGUP, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \
|
||||||
|
KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
|
||||||
|
KC_LSFT, KC_NUHS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NUBS,KC_RSFT, KC_UP, \
|
||||||
|
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_SPC, KC_RGUI,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
*/
|
||||||
|
[_FL] = LAYOUT(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_VOLU, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \
|
||||||
|
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, KC_PGUP, \
|
||||||
|
_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END),
|
||||||
|
|
||||||
|
/* Keymap _CL: Control layer
|
||||||
|
*/
|
||||||
|
[_CL] = LAYOUT(
|
||||||
|
BL_STEP,S_ONEUP,S_SCALE,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, BL_TOGG, BL_INC, \
|
||||||
|
_______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC, \
|
||||||
|
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \
|
||||||
|
_______,_______,_______, BL_BRTG,BL_BRTG, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
case S_BSKTC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_basketcase);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_ODEJY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_ode_to_joy);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_RCKBY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_rock_a_bye_baby);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_DOEDR:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_doe_a_deer);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_SCALE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_scale);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_ONEUP:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_one_up);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_COIN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_coin);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_SONIC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_sonic_ring);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case S_ZELDA:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(song_zelda_puzzle);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# Default Clueboard 66% Hotswap Layout
|
||||||
|
|
||||||
|
This is the default layout that comes flashed on every Clueboard. For the most
|
||||||
|
part it's a straightforward and easy to follow layout. The only unusual key is
|
||||||
|
the key in the upper left, which sends Escape normally, but Grave when any of
|
||||||
|
the Ctrl, Alt, or GUI modifiers are held down.
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "stdio.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
int8_t sendchar(uint8_t c) {
|
||||||
|
fprintf(stderr, "%c", c);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((weak)) debug_config_t debug_config = {0};
|
||||||
|
|
||||||
|
void init_logging(void) {
|
||||||
|
print_set_sendchar(sendchar);
|
||||||
|
|
||||||
|
// Customise these values to desired behaviour
|
||||||
|
// debug_enable = true;
|
||||||
|
// debug_matrix = true;
|
||||||
|
// debug_keyboard = true;
|
||||||
|
// debug_mouse = true;
|
||||||
|
debug_config.raw = 0xFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
|
|
||||||
|
init_logging();
|
||||||
|
|
||||||
|
return RUN_ALL_TESTS();
|
||||||
|
}
|
||||||
@@ -7,10 +7,10 @@
|
|||||||
#include "action_tapping.h"
|
#include "action_tapping.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#include "debug.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
void set_time(uint32_t t);
|
void set_time(uint32_t t);
|
||||||
void advance_time(uint32_t ms);
|
void advance_time(uint32_t ms);
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,10 @@ using testing::Between;
|
|||||||
using testing::Return;
|
using testing::Return;
|
||||||
|
|
||||||
void TestFixture::SetUpTestCase() {
|
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;
|
TestDriver driver;
|
||||||
EXPECT_CALL(driver, send_keyboard_mock(_));
|
EXPECT_CALL(driver, send_keyboard_mock(_));
|
||||||
keyboard_init();
|
keyboard_init();
|
||||||
|
|||||||
Reference in new issue
Block a user