Optimise Catch2 V3 includes + fix a few cases of missing includes
parent
45f70e004c
commit
353affb9f3
|
|
@ -1,4 +1,4 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../modules/stubs/stub_serial.h"
|
#include "../modules/stubs/stub_serial.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "registers.h"
|
#include "registers.h"
|
||||||
#include "modules/globals.h"
|
#include "modules/globals.h"
|
||||||
#include "../modules/stubs/stub_eeprom.h"
|
#include "../modules/stubs/stub_eeprom.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
#include "circular_buffer.h"
|
#include "circular_buffer.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
using Catch::Matchers::Equals;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
#include "progmem.h"
|
#include "progmem.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
using Catch::Matchers::Equals;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
#include "../../../../src/modules/buttons.h"
|
#include "../../../../src/modules/buttons.h"
|
||||||
#include "../../../../src/modules/finda.h"
|
#include "../../../../src/modules/finda.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
#include "../../../../src/modules/buttons.h"
|
#include "../../../../src/modules/buttons.h"
|
||||||
#include "../../../../src/modules/finda.h"
|
#include "../../../../src/modules/finda.h"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
// As a base for this test, unload_filament was chosen.
|
// As a base for this test, unload_filament was chosen.
|
||||||
// Moreover, I didn't want to spoil the unit tests of the state machines themself with this.
|
// Moreover, I didn't want to spoil the unit tests of the state machines themself with this.
|
||||||
|
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
#include "../../../../src/modules/buttons.h"
|
#include "../../../../src/modules/buttons.h"
|
||||||
#include "../../../../src/modules/finda.h"
|
#include "../../../../src/modules/finda.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
#include "../../../../src/modules/buttons.h"
|
#include "../../../../src/modules/buttons.h"
|
||||||
#include "../../../../src/modules/finda.h"
|
#include "../../../../src/modules/finda.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
#include "../../../../src/modules/buttons.h"
|
#include "../../../../src/modules/buttons.h"
|
||||||
#include "../../../../src/modules/finda.h"
|
#include "../../../../src/modules/finda.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
#include "../../../../src/modules/buttons.h"
|
#include "../../../../src/modules/buttons.h"
|
||||||
#include "../../../../src/modules/finda.h"
|
#include "../../../../src/modules/finda.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/generators/catch_generators.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
#include "../../../../src/modules/buttons.h"
|
#include "../../../../src/modules/buttons.h"
|
||||||
#include "../../../../src/modules/finda.h"
|
#include "../../../../src/modules/finda.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "main_loop_stub.h"
|
#include "main_loop_stub.h"
|
||||||
#include "homing.h"
|
#include "homing.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
#include "../../../../src/modules/buttons.h"
|
#include "../../../../src/modules/buttons.h"
|
||||||
#include "../../../../src/modules/finda.h"
|
#include "../../../../src/modules/finda.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
#include "../../../../src/modules/buttons.h"
|
#include "../../../../src/modules/buttons.h"
|
||||||
#include "../../../../src/modules/finda.h"
|
#include "../../../../src/modules/finda.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/generators/catch_generators_range.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "../stubs/stub_adc.h"
|
#include "../stubs/stub_adc.h"
|
||||||
#include "../stubs/stub_timebase.h"
|
#include "../stubs/stub_timebase.h"
|
||||||
#include "buttons.h"
|
#include "buttons.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/generators/catch_generators.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
#include "leds.h"
|
#include "leds.h"
|
||||||
#include "shr16.h"
|
#include "shr16.h"
|
||||||
#include "../stubs/stub_timebase.h"
|
#include "../stubs/stub_timebase.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "motion.h"
|
#include "motion.h"
|
||||||
|
|
||||||
using namespace modules::motion;
|
using namespace modules::motion;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/generators/catch_generators.hpp"
|
||||||
#include "../logic/error_codes.h"
|
#include "../logic/error_codes.h"
|
||||||
#include "../logic/progress_codes.h"
|
#include "../logic/progress_codes.h"
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
// some safe margin for the buffer
|
// some safe margin for the buffer
|
||||||
using TXBuff = std::array<uint8_t, 2 * std::max(mp::Protocol::MaxRequestSize(), mp::Protocol::MaxResponseSize())>;
|
using TXBuff = std::array<uint8_t, 2 * std::max(mp::Protocol::MaxRequestSize(), mp::Protocol::MaxResponseSize())>;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
#include "pulse_gen.h"
|
#include "pulse_gen.h"
|
||||||
#include "../pins.h"
|
#include "../pins.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
#include "speed_table.h"
|
#include "speed_table.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
|
||||||
#include "../../../../src/hal/eeprom.h"
|
#include "../../../../src/hal/eeprom.h"
|
||||||
#include "stub_eeprom.h"
|
#include "stub_eeprom.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/matchers/catch_matchers_vector.hpp"
|
||||||
#include "timebase.h"
|
#include "timebase.h"
|
||||||
#include "../stubs/stub_timebase.h"
|
#include "../stubs/stub_timebase.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
#include "catch2/generators/catch_generators.hpp"
|
||||||
#include "../stubs/stub_adc.h"
|
#include "../stubs/stub_adc.h"
|
||||||
#include "../stubs/stub_timebase.h"
|
#include "../stubs/stub_timebase.h"
|
||||||
#include "buttons.h"
|
#include "buttons.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "catch2/catch_all.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
|
|
||||||
TEST_CASE("type tests", "[system]") {
|
TEST_CASE("type tests", "[system]") {
|
||||||
REQUIRE(sizeof(uint64_t) == 8);
|
REQUIRE(sizeof(uint64_t) == 8);
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
//#define CATCH_CONFIG_ENABLE_BENCHMARKING
|
//#define CATCH_CONFIG_ENABLE_BENCHMARKING
|
||||||
#include "catch2/catch_all.hpp"
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue