aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-12-28 04:36:32 +1100
committerGitHub <noreply@github.com>2020-12-28 04:36:32 +1100
commit1b7b72c0e96856d2b9f73f705787af3426662bcf (patch)
treeb03387eee60a4650d850c11daf7a962285837da6 /tests
parentbbf0f65284f6c9cc40429f446bddf48e2e882ad0 (diff)
downloadqmk_firmware-1b7b72c0e96856d2b9f73f705787af3426662bcf.tar.gz
qmk_firmware-1b7b72c0e96856d2b9f73f705787af3426662bcf.zip
Ensure single newline at EOF for core files (#11310)
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/config.h5
-rw-r--r--tests/basic/rules.mk2
-rw-r--r--tests/basic/test_macro.cpp2
-rw-r--r--tests/test_common/keyboard_report_util.cpp2
-rw-r--r--tests/test_common/keyboard_report_util.hpp2
-rw-r--r--tests/test_common/test_driver.hpp8
-rw-r--r--tests/test_common/test_fixture.hpp4
7 files changed, 9 insertions, 16 deletions
diff --git a/tests/basic/config.h b/tests/basic/config.h
index e5d018a32..99bd62d99 100644
--- a/tests/basic/config.h
+++ b/tests/basic/config.h
@@ -14,10 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#ifndef TESTS_BASIC_CONFIG_H_ 17#pragma once
18#define TESTS_BASIC_CONFIG_H_
19 18
20#define MATRIX_ROWS 4 19#define MATRIX_ROWS 4
21#define MATRIX_COLS 10 20#define MATRIX_COLS 10
22
23#endif /* TESTS_BASIC_CONFIG_H_ */
diff --git a/tests/basic/rules.mk b/tests/basic/rules.mk
index 8a906807c..9fb5d4361 100644
--- a/tests/basic/rules.mk
+++ b/tests/basic/rules.mk
@@ -13,4 +13,4 @@
13# You should have received a copy of the GNU General Public License 13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>. 14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
16CUSTOM_MATRIX=yes \ No newline at end of file 16CUSTOM_MATRIX=yes
diff --git a/tests/basic/test_macro.cpp b/tests/basic/test_macro.cpp
index a1fa31708..dc4a77796 100644
--- a/tests/basic/test_macro.cpp
+++ b/tests/basic/test_macro.cpp
@@ -68,4 +68,4 @@ TEST_F(Macro, PlayASimpleMacro) {
68 EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(210); 68 EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(210);
69 EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(220); 69 EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(220);
70 run_one_scan_loop(); 70 run_one_scan_loop();
71} \ No newline at end of file 71}
diff --git a/tests/test_common/keyboard_report_util.cpp b/tests/test_common/keyboard_report_util.cpp
index 245072c0e..cb044c92b 100644
--- a/tests/test_common/keyboard_report_util.cpp
+++ b/tests/test_common/keyboard_report_util.cpp
@@ -71,4 +71,4 @@ bool KeyboardReportMatcher::MatchAndExplain(report_keyboard_t& report, MatchResu
71 71
72void KeyboardReportMatcher::DescribeTo(::std::ostream* os) const { *os << "is equal to " << m_report; } 72void KeyboardReportMatcher::DescribeTo(::std::ostream* os) const { *os << "is equal to " << m_report; }
73 73
74void KeyboardReportMatcher::DescribeNegationTo(::std::ostream* os) const { *os << "is not equal to " << m_report; } \ No newline at end of file 74void KeyboardReportMatcher::DescribeNegationTo(::std::ostream* os) const { *os << "is not equal to " << m_report; }
diff --git a/tests/test_common/keyboard_report_util.hpp b/tests/test_common/keyboard_report_util.hpp
index 48543c205..2c33f0412 100644
--- a/tests/test_common/keyboard_report_util.hpp
+++ b/tests/test_common/keyboard_report_util.hpp
@@ -36,4 +36,4 @@ private:
36template<typename... Ts> 36template<typename... Ts>
37inline testing::Matcher<report_keyboard_t&> KeyboardReport(Ts... keys) { 37inline testing::Matcher<report_keyboard_t&> KeyboardReport(Ts... keys) {
38 return testing::MakeMatcher(new KeyboardReportMatcher(std::vector<uint8_t>({keys...}))); 38 return testing::MakeMatcher(new KeyboardReportMatcher(std::vector<uint8_t>({keys...})));
39} \ No newline at end of file 39}
diff --git a/tests/test_common/test_driver.hpp b/tests/test_common/test_driver.hpp
index c3ae17b1a..f86308df9 100644
--- a/tests/test_common/test_driver.hpp
+++ b/tests/test_common/test_driver.hpp
@@ -14,8 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#ifndef TESTS_TEST_COMMON_TEST_DRIVER_H_ 17#pragma once
18#define TESTS_TEST_COMMON_TEST_DRIVER_H_
19 18
20#include "gmock/gmock.h" 19#include "gmock/gmock.h"
21#include <stdint.h> 20#include <stdint.h>
@@ -28,7 +27,7 @@ public:
28 TestDriver(); 27 TestDriver();
29 ~TestDriver(); 28 ~TestDriver();
30 void set_leds(uint8_t leds) { m_leds = leds; } 29 void set_leds(uint8_t leds) { m_leds = leds; }
31 30
32 MOCK_METHOD1(send_keyboard_mock, void (report_keyboard_t&)); 31 MOCK_METHOD1(send_keyboard_mock, void (report_keyboard_t&));
33 MOCK_METHOD1(send_mouse_mock, void (report_mouse_t&)); 32 MOCK_METHOD1(send_mouse_mock, void (report_mouse_t&));
34 MOCK_METHOD1(send_system_mock, void (uint16_t)); 33 MOCK_METHOD1(send_system_mock, void (uint16_t));
@@ -43,6 +42,3 @@ private:
43 uint8_t m_leds = 0; 42 uint8_t m_leds = 0;
44 static TestDriver* m_this; 43 static TestDriver* m_this;
45}; 44};
46
47
48#endif /* TESTS_TEST_COMMON_TEST_DRIVER_H_ */
diff --git a/tests/test_common/test_fixture.hpp b/tests/test_common/test_fixture.hpp
index fb37e440f..340503665 100644
--- a/tests/test_common/test_fixture.hpp
+++ b/tests/test_common/test_fixture.hpp
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17 #pragma once 17#pragma once
18 18
19#include "gtest/gtest.h" 19#include "gtest/gtest.h"
20 20
@@ -27,4 +27,4 @@ public:
27 27
28 void run_one_scan_loop(); 28 void run_one_scan_loop();
29 void idle_for(unsigned ms); 29 void idle_for(unsigned ms);
30}; \ No newline at end of file 30};