cleanup: unit tests: Remove unused Catch namespace

pull/279/head
Guðni Már Gilbert 2023-05-29 15:56:38 +00:00
parent 6532a435d2
commit 402d15beb3
16 changed files with 0 additions and 42 deletions

View File

@ -1,9 +1,6 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "circular_buffer.h"
using Catch::Matchers::Equals;
TEST_CASE("circular_buffer::basic", "[circular_buffer]") {
using CB = CircularBuffer<uint8_t, uint8_t, 32>;

View File

@ -1,8 +1,6 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "progmem.h"
using Catch::Matchers::Equals;
namespace pm = hal::progmem;
TEST_CASE("progmem::read_word", "[progmem]") {

View File

@ -1,5 +1,4 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "../../../../src/modules/buttons.h"
#include "../../../../src/modules/finda.h"
@ -19,8 +18,6 @@
#include "../stubs/main_loop_stub.h"
#include "../stubs/stub_motion.h"
using Catch::Matchers::Equals;
#include "../helpers/helpers.ipp"
void CutSlot(logic::CutFilament &cf, uint8_t startSlot, uint8_t cutSlot) {

View File

@ -1,5 +1,4 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "../../../../src/modules/buttons.h"
#include "../../../../src/modules/finda.h"
@ -18,8 +17,6 @@
#include "../stubs/main_loop_stub.h"
#include "../stubs/stub_motion.h"
using Catch::Matchers::Equals;
#include "../helpers/helpers.ipp"
// temporarily disabled

View File

@ -3,7 +3,6 @@
// Moreover, I didn't want to spoil the unit tests of the state machines themself with this.
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "../../../../src/modules/buttons.h"
#include "../../../../src/modules/finda.h"
@ -23,8 +22,6 @@
#include "../stubs/main_loop_stub.h"
#include "../stubs/stub_motion.h"
using Catch::Matchers::Equals;
#include "../helpers/helpers.ipp"
void CauseTMCError(mm::Axis axis, hal::tmc2130::ErrorFlags ef) {

View File

@ -1,5 +1,4 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "../../../../src/modules/buttons.h"
#include "../../../../src/modules/finda.h"
@ -18,8 +17,6 @@
#include "../stubs/main_loop_stub.h"
#include "../stubs/stub_motion.h"
using Catch::Matchers::Equals;
namespace ha = hal::adc;
TEST_CASE("feed_to_bondtech::feed_phase_unlimited", "[feed_to_bondtech]") {

View File

@ -1,5 +1,4 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "../../../../src/modules/buttons.h"
#include "../../../../src/modules/finda.h"
@ -18,8 +17,6 @@
#include "../stubs/main_loop_stub.h"
#include "../stubs/stub_motion.h"
using Catch::Matchers::Equals;
namespace ha = hal::adc;
TEST_CASE("feed_to_finda::feed_phase_unlimited", "[feed_to_finda]") {

View File

@ -1,5 +1,4 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "../../../../src/modules/buttons.h"
#include "../../../../src/modules/finda.h"
@ -22,8 +21,6 @@
#include "../stubs/main_loop_stub.h"
#include "../stubs/stub_motion.h"
using Catch::Matchers::Equals;
#include "../helpers/helpers.ipp"
bool SuccessfulHome(uint8_t slot) {

View File

@ -1,6 +1,5 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/generators/catch_generators.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include <functional>
@ -23,7 +22,6 @@
#include "../stubs/main_loop_stub.h"
#include "../stubs/stub_motion.h"
using Catch::Matchers::Equals;
using namespace std::placeholders;
#include "../helpers/helpers.ipp"

View File

@ -1,5 +1,4 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "../../../../src/modules/buttons.h"
#include "../../../../src/modules/finda.h"
@ -23,7 +22,6 @@
#include <functional>
using Catch::Matchers::Equals;
using namespace std::placeholders;
#include "../helpers/helpers.ipp"

View File

@ -1,5 +1,4 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include <functional>
@ -22,7 +21,6 @@
#include "../stubs/main_loop_stub.h"
#include "../stubs/stub_motion.h"
using Catch::Matchers::Equals;
using namespace std::placeholders;
#include "../helpers/helpers.ipp"
@ -164,7 +162,6 @@ void FindaDidntTriggerCommonSetup(uint8_t slot, logic::UnloadFilament &uf) {
REQUIRE(VerifyState(uf, mg::FilamentLoadState::InSelector, mi::Idler::IdleSlotIndex(), slot, true, false, ml::off, ml::blink0, ErrorCode::FINDA_DIDNT_SWITCH_OFF, ProgressCode::ERRWaitingForUser));
}
void FindaDidntTriggerResolveTryAgain(uint8_t slot, logic::UnloadFilament &uf) {
// Stage 3 - the user has to do something
// there are 3 options:

View File

@ -1,6 +1,5 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/generators/catch_generators_range.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include <functional>
@ -21,7 +20,6 @@
#include "../stubs/main_loop_stub.h"
#include "../stubs/stub_motion.h"
using Catch::Matchers::Equals;
using namespace std::placeholders;
namespace ha = hal::adc;

View File

@ -1,13 +1,10 @@
#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"
#include "../../../../src/modules/timebase.h"
using Catch::Matchers::Equals;
uint16_t millis = 0;
namespace hal {

View File

@ -1,10 +1,8 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "pulse_gen.h"
#include "../pins.h"
#include <stdio.h>
using Catch::Matchers::Equals;
using namespace modules::pulse_gen;
using hal::gpio::Level;
using hal::gpio::ReadPin;

View File

@ -1,9 +1,7 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "speed_table.h"
#include <stdio.h>
using Catch::Matchers::Equals;
using namespace modules::speed_table;
// The following reference values are calculated for 2MHz timer

View File

@ -1,10 +1,7 @@
#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_vector.hpp"
#include "timebase.h"
#include "../stubs/stub_timebase.h"
using Catch::Matchers::Equals;
// this is not a pure test of the real implementation (it would require splitting the timebase.cpp into 2 parts)
// but serves the sole purpose of debugging the Elapsed() impl.
TEST_CASE("timebase::Elapsed", "[timebase]") {