"files.exclude": {
"**/.build": true,
"**/*.hex": true
+ },
+ "files.associations": {
+ "*.h": "c",
+ "*.c": "c",
+ "*.cpp": "cpp",
+ "*.hpp": "cpp"
}
}
\ No newline at end of file
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "test_common.h"
+#include "test_common.hpp"
using testing::_;
using testing::Return;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "test_common.h"
+#include "test_common.hpp"
#include "time.h"
using testing::InSequence;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "test_common.h"
+#include "test_common.hpp"
#include "action_tapping.h"
using testing::_;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
- #include "keyboard_report_util.h"
+ #include "keyboard_report_util.hpp"
#include <vector>
#include <algorithm>
using namespace testing;
+++ /dev/null
-/* Copyright 2017 Fred Sundvik
- *
- * 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/>.
- */
-
-#pragma once
-#include "report.h"
-#include <ostream>
-#include "gmock/gmock.h"
-
-bool operator==(const report_keyboard_t& lhs, const report_keyboard_t& rhs);
-std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& value);
-
-class KeyboardReportMatcher : public testing::MatcherInterface<report_keyboard_t&> {
- public:
- KeyboardReportMatcher(const std::vector<uint8_t>& keys);
- virtual bool MatchAndExplain(report_keyboard_t& report, testing::MatchResultListener* listener) const override;
- virtual void DescribeTo(::std::ostream* os) const override;
- virtual void DescribeNegationTo(::std::ostream* os) const override;
-private:
- report_keyboard_t m_report;
-};
-
-
-template<typename... Ts>
-inline testing::Matcher<report_keyboard_t&> KeyboardReport(Ts... keys) {
- return testing::MakeMatcher(new KeyboardReportMatcher(std::vector<uint8_t>({keys...})));
-}
\ No newline at end of file
--- /dev/null
+/* Copyright 2017 Fred Sundvik
+ *
+ * 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/>.
+ */
+
+#pragma once
+#include "report.h"
+#include <ostream>
+#include "gmock/gmock.h"
+
+bool operator==(const report_keyboard_t& lhs, const report_keyboard_t& rhs);
+std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& value);
+
+class KeyboardReportMatcher : public testing::MatcherInterface<report_keyboard_t&> {
+ public:
+ KeyboardReportMatcher(const std::vector<uint8_t>& keys);
+ virtual bool MatchAndExplain(report_keyboard_t& report, testing::MatchResultListener* listener) const override;
+ virtual void DescribeTo(::std::ostream* os) const override;
+ virtual void DescribeNegationTo(::std::ostream* os) const override;
+private:
+ report_keyboard_t m_report;
+};
+
+
+template<typename... Ts>
+inline testing::Matcher<report_keyboard_t&> KeyboardReport(Ts... keys) {
+ return testing::MakeMatcher(new KeyboardReportMatcher(std::vector<uint8_t>({keys...})));
+}
\ No newline at end of file
+++ /dev/null
-/* Copyright 2017 Fred Sundvik
- *
- * 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 "gtest/gtest.h"
-#include "gmock/gmock.h"
-
-#include "quantum.h"
-#include "test_driver.h"
-#include "test_matrix.h"
-#include "keyboard_report_util.h"
-#include "test_fixture.h"
\ No newline at end of file
--- /dev/null
+/* Copyright 2017 Fred Sundvik
+ *
+ * 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 "gtest/gtest.h"
+#include "gmock/gmock.h"
+
+#include "quantum.h"
+#include "test_driver.hpp"
+#include "test_matrix.h"
+#include "keyboard_report_util.hpp"
+#include "test_fixture.hpp"
\ No newline at end of file
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "test_driver.h"
+#include "test_driver.hpp"
TestDriver* TestDriver::m_this = nullptr;
+++ /dev/null
-/* Copyright 2017 Fred Sundvik
- *
- * 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/>.
- */
-
-#ifndef TESTS_TEST_COMMON_TEST_DRIVER_H_
-#define TESTS_TEST_COMMON_TEST_DRIVER_H_
-
-#include "gmock/gmock.h"
-#include <stdint.h>
-#include "host.h"
-#include "keyboard_report_util.h"
-
-
-class TestDriver {
-public:
- TestDriver();
- ~TestDriver();
- void set_leds(uint8_t leds) { m_leds = leds; }
-
- MOCK_METHOD1(send_keyboard_mock, void (report_keyboard_t&));
- MOCK_METHOD1(send_mouse_mock, void (report_mouse_t&));
- MOCK_METHOD1(send_system_mock, void (uint16_t));
- MOCK_METHOD1(send_consumer_mock, void (uint16_t));
-private:
- static uint8_t keyboard_leds(void);
- static void send_keyboard(report_keyboard_t *report);
- static void send_mouse(report_mouse_t* report);
- static void send_system(uint16_t data);
- static void send_consumer(uint16_t data);
- host_driver_t m_driver;
- uint8_t m_leds = 0;
- static TestDriver* m_this;
-};
-
-
-#endif /* TESTS_TEST_COMMON_TEST_DRIVER_H_ */
--- /dev/null
+/* Copyright 2017 Fred Sundvik
+ *
+ * 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/>.
+ */
+
+#ifndef TESTS_TEST_COMMON_TEST_DRIVER_H_
+#define TESTS_TEST_COMMON_TEST_DRIVER_H_
+
+#include "gmock/gmock.h"
+#include <stdint.h>
+#include "host.h"
+#include "keyboard_report_util.hpp"
+
+
+class TestDriver {
+public:
+ TestDriver();
+ ~TestDriver();
+ void set_leds(uint8_t leds) { m_leds = leds; }
+
+ MOCK_METHOD1(send_keyboard_mock, void (report_keyboard_t&));
+ MOCK_METHOD1(send_mouse_mock, void (report_mouse_t&));
+ MOCK_METHOD1(send_system_mock, void (uint16_t));
+ MOCK_METHOD1(send_consumer_mock, void (uint16_t));
+private:
+ static uint8_t keyboard_leds(void);
+ static void send_keyboard(report_keyboard_t *report);
+ static void send_mouse(report_mouse_t* report);
+ static void send_system(uint16_t data);
+ static void send_consumer(uint16_t data);
+ host_driver_t m_driver;
+ uint8_t m_leds = 0;
+ static TestDriver* m_this;
+};
+
+
+#endif /* TESTS_TEST_COMMON_TEST_DRIVER_H_ */
-#include "test_fixture.h"
+#include "test_fixture.hpp"
#include "gmock/gmock.h"
-#include "test_driver.h"
+#include "test_driver.hpp"
#include "test_matrix.h"
#include "keyboard.h"
#include "action.h"
+++ /dev/null
-/* Copyright 2017 Fred Sundvik
- *
- * 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/>.
- */
-
- #pragma once
-
-#include "gtest/gtest.h"
-
-class TestFixture : public testing::Test {
-public:
- TestFixture();
- ~TestFixture();
- static void SetUpTestCase();
- static void TearDownTestCase();
-
- void run_one_scan_loop();
- void idle_for(uint ms);
-};
\ No newline at end of file
--- /dev/null
+/* Copyright 2017 Fred Sundvik
+ *
+ * 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/>.
+ */
+
+ #pragma once
+
+#include "gtest/gtest.h"
+
+class TestFixture : public testing::Test {
+public:
+ TestFixture();
+ ~TestFixture();
+ static void SetUpTestCase();
+ static void TearDownTestCase();
+
+ void run_one_scan_loop();
+ void idle_for(uint ms);
+};
\ No newline at end of file