Merge pull request #954 from gedankenexperimenter/t/testing.nitpicks

Improve consistency and readability of code in testing/*
pull/957/head
Gergely Nagy 4 years ago committed by GitHub
commit 6479579e76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -66,11 +66,11 @@ void SimHarness::Release(uint8_t row, uint8_t col) {
}
void SimHarness::SetCycleTime(uint8_t millis) {
millis_per_cycle = millis;
millis_per_cycle_ = millis;
}
uint8_t SimHarness::CycleTime() {
return millis_per_cycle;
uint8_t SimHarness::CycleTime() const {
return millis_per_cycle_;
}

@ -35,9 +35,10 @@ class SimHarness {
void Press(uint8_t row, uint8_t col);
void Release(uint8_t row, uint8_t col);
void SetCycleTime(uint8_t millis);
uint8_t CycleTime();
uint8_t CycleTime() const;
private:
uint8_t millis_per_cycle = 1;
uint8_t millis_per_cycle_ = 1;
};
} // namespace testing

@ -30,12 +30,12 @@
#include "testing/matchers.h"
#include "testing/VirtualDeviceTest.h"
#define SETUP_GOOGLETEST() \
void executeTestFunction() { \
setup(); /* setup Kaleidoscope */ \
/* Turn off virtual_io's input. */ \
Kaleidoscope.device().keyScanner().setEnableReadMatrix(false); \
testing::InitGoogleTest(); \
int result = RUN_ALL_TESTS(); \
exit(result); \
#define SETUP_GOOGLETEST() \
void executeTestFunction() { \
setup(); /* setup Kaleidoscope */ \
/* Turn off virtual_io's input. */ \
Kaleidoscope.device().keyScanner().setEnableReadMatrix(false); \
testing::InitGoogleTest(); \
int result = RUN_ALL_TESTS(); \
exit(result); \
}

Loading…
Cancel
Save