Optimise Catch2 V3 includes + fix a few cases of missing includes

pull/222/head
Guðni Már Gilbert 2022-10-17 18:08:58 +00:00
parent 6248ce93d7
commit 78983906de
26 changed files with 51 additions and 26 deletions

View File

@ -1,4 +1,4 @@
#include "catch2/catch_all.hpp"
#include "catch2/catch_test_macros.hpp"
#include "application.h"
#include <stdint.h>
#include "../modules/stubs/stub_serial.h"

View File

@ -1,4 +1,4 @@
#include "catch2/catch_all.hpp"
#include "catch2/catch_test_macros.hpp"
#include "registers.h"
#include "modules/globals.h"
#include "../modules/stubs/stub_eeprom.h"

View File

@ -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"
using Catch::Matchers::Equals;

View File

@ -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"
using Catch::Matchers::Equals;

View File

@ -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/finda.h"

View File

@ -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/finda.h"

View File

@ -2,7 +2,8 @@
// 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.
#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/finda.h"

View File

@ -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/finda.h"

View File

@ -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/finda.h"

View File

@ -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/finda.h"

View File

@ -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/finda.h"

View File

@ -1,4 +1,4 @@
#include "catch2/catch_all.hpp"
#include "catch2/catch_test_macros.hpp"
#include "main_loop_stub.h"
#include "homing.h"

View File

@ -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/finda.h"

View File

@ -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/finda.h"

View File

@ -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>

View File

@ -1,4 +1,4 @@
#include "catch2/catch_all.hpp"
#include "catch2/catch_test_macros.hpp"
#include "../stubs/stub_adc.h"
#include "../stubs/stub_timebase.h"
#include "buttons.h"

View File

@ -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 "shr16.h"
#include "../stubs/stub_timebase.h"

View File

@ -1,4 +1,4 @@
#include "catch2/catch_all.hpp"
#include "catch2/catch_test_macros.hpp"
#include "motion.h"
using namespace modules::motion;

View File

@ -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/progress_codes.h"
#include "protocol.h"
#include <array>
#include <algorithm>
// some safe margin for the buffer
using TXBuff = std::array<uint8_t, 2 * std::max(mp::Protocol::MaxRequestSize(), mp::Protocol::MaxResponseSize())>;

View File

@ -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 "../pins.h"
#include <stdio.h>

View File

@ -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 <stdio.h>

View File

@ -1,4 +1,4 @@
#include "catch2/catch_all.hpp"
#include "catch2/catch_test_macros.hpp"
#include "../../../../src/hal/eeprom.h"
#include "stub_eeprom.h"

View File

@ -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 "../stubs/stub_timebase.h"

View File

@ -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_timebase.h"
#include "buttons.h"

View File

@ -1,4 +1,4 @@
#include "catch2/catch_all.hpp"
#include "catch2/catch_test_macros.hpp"
TEST_CASE("type tests", "[system]") {
REQUIRE(sizeof(uint64_t) == 8);

View File

@ -1,2 +1 @@
//#define CATCH_CONFIG_ENABLE_BENCHMARKING
#include "catch2/catch_all.hpp"