cleanup: unit tests: Remove unused Catch namespace
parent
6532a435d2
commit
8c873c8a53
|
|
@ -1,9 +1,6 @@
|
||||||
#include "catch2/catch_test_macros.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;
|
|
||||||
|
|
||||||
TEST_CASE("circular_buffer::basic", "[circular_buffer]") {
|
TEST_CASE("circular_buffer::basic", "[circular_buffer]") {
|
||||||
|
|
||||||
using CB = CircularBuffer<uint8_t, uint8_t, 32>;
|
using CB = CircularBuffer<uint8_t, uint8_t, 32>;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
#include "catch2/catch_test_macros.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "catch2/matchers/catch_matchers_vector.hpp"
|
|
||||||
#include "progmem.h"
|
#include "progmem.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
namespace pm = hal::progmem;
|
namespace pm = hal::progmem;
|
||||||
|
|
||||||
TEST_CASE("progmem::read_word", "[progmem]") {
|
TEST_CASE("progmem::read_word", "[progmem]") {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include "catch2/catch_test_macros.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"
|
||||||
|
|
@ -19,8 +18,6 @@
|
||||||
#include "../stubs/main_loop_stub.h"
|
#include "../stubs/main_loop_stub.h"
|
||||||
#include "../stubs/stub_motion.h"
|
#include "../stubs/stub_motion.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
|
|
||||||
#include "../helpers/helpers.ipp"
|
#include "../helpers/helpers.ipp"
|
||||||
|
|
||||||
void CutSlot(logic::CutFilament &cf, uint8_t startSlot, uint8_t cutSlot) {
|
void CutSlot(logic::CutFilament &cf, uint8_t startSlot, uint8_t cutSlot) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include "catch2/catch_test_macros.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"
|
||||||
|
|
@ -18,8 +17,6 @@
|
||||||
#include "../stubs/main_loop_stub.h"
|
#include "../stubs/main_loop_stub.h"
|
||||||
#include "../stubs/stub_motion.h"
|
#include "../stubs/stub_motion.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
|
|
||||||
#include "../helpers/helpers.ipp"
|
#include "../helpers/helpers.ipp"
|
||||||
|
|
||||||
// temporarily disabled
|
// temporarily disabled
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
// 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_test_macros.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"
|
||||||
|
|
@ -23,8 +22,6 @@
|
||||||
#include "../stubs/main_loop_stub.h"
|
#include "../stubs/main_loop_stub.h"
|
||||||
#include "../stubs/stub_motion.h"
|
#include "../stubs/stub_motion.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
|
|
||||||
#include "../helpers/helpers.ipp"
|
#include "../helpers/helpers.ipp"
|
||||||
|
|
||||||
void CauseTMCError(mm::Axis axis, hal::tmc2130::ErrorFlags ef) {
|
void CauseTMCError(mm::Axis axis, hal::tmc2130::ErrorFlags ef) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include "catch2/catch_test_macros.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"
|
||||||
|
|
@ -18,8 +17,6 @@
|
||||||
#include "../stubs/main_loop_stub.h"
|
#include "../stubs/main_loop_stub.h"
|
||||||
#include "../stubs/stub_motion.h"
|
#include "../stubs/stub_motion.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
|
|
||||||
namespace ha = hal::adc;
|
namespace ha = hal::adc;
|
||||||
|
|
||||||
TEST_CASE("feed_to_bondtech::feed_phase_unlimited", "[feed_to_bondtech]") {
|
TEST_CASE("feed_to_bondtech::feed_phase_unlimited", "[feed_to_bondtech]") {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include "catch2/catch_test_macros.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"
|
||||||
|
|
@ -18,8 +17,6 @@
|
||||||
#include "../stubs/main_loop_stub.h"
|
#include "../stubs/main_loop_stub.h"
|
||||||
#include "../stubs/stub_motion.h"
|
#include "../stubs/stub_motion.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
|
|
||||||
namespace ha = hal::adc;
|
namespace ha = hal::adc;
|
||||||
|
|
||||||
TEST_CASE("feed_to_finda::feed_phase_unlimited", "[feed_to_finda]") {
|
TEST_CASE("feed_to_finda::feed_phase_unlimited", "[feed_to_finda]") {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include "catch2/catch_test_macros.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"
|
||||||
|
|
@ -22,8 +21,6 @@
|
||||||
#include "../stubs/main_loop_stub.h"
|
#include "../stubs/main_loop_stub.h"
|
||||||
#include "../stubs/stub_motion.h"
|
#include "../stubs/stub_motion.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
|
|
||||||
#include "../helpers/helpers.ipp"
|
#include "../helpers/helpers.ipp"
|
||||||
|
|
||||||
bool SuccessfulHome(uint8_t slot) {
|
bool SuccessfulHome(uint8_t slot) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
#include "catch2/catch_test_macros.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "catch2/generators/catch_generators.hpp"
|
#include "catch2/generators/catch_generators.hpp"
|
||||||
#include "catch2/matchers/catch_matchers_vector.hpp"
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
|
@ -23,7 +22,6 @@
|
||||||
#include "../stubs/main_loop_stub.h"
|
#include "../stubs/main_loop_stub.h"
|
||||||
#include "../stubs/stub_motion.h"
|
#include "../stubs/stub_motion.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include "../helpers/helpers.ipp"
|
#include "../helpers/helpers.ipp"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include "catch2/catch_test_macros.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"
|
||||||
|
|
@ -23,7 +22,6 @@
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include "../helpers/helpers.ipp"
|
#include "../helpers/helpers.ipp"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include "catch2/catch_test_macros.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "catch2/matchers/catch_matchers_vector.hpp"
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
|
@ -22,7 +21,6 @@
|
||||||
#include "../stubs/main_loop_stub.h"
|
#include "../stubs/main_loop_stub.h"
|
||||||
#include "../stubs/stub_motion.h"
|
#include "../stubs/stub_motion.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include "../helpers/helpers.ipp"
|
#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));
|
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) {
|
void FindaDidntTriggerResolveTryAgain(uint8_t slot, logic::UnloadFilament &uf) {
|
||||||
// Stage 3 - the user has to do something
|
// Stage 3 - the user has to do something
|
||||||
// there are 3 options:
|
// there are 3 options:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
#include "catch2/catch_test_macros.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "catch2/generators/catch_generators_range.hpp"
|
#include "catch2/generators/catch_generators_range.hpp"
|
||||||
#include "catch2/matchers/catch_matchers_vector.hpp"
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
|
@ -21,7 +20,6 @@
|
||||||
#include "../stubs/main_loop_stub.h"
|
#include "../stubs/main_loop_stub.h"
|
||||||
#include "../stubs/stub_motion.h"
|
#include "../stubs/stub_motion.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
namespace ha = hal::adc;
|
namespace ha = hal::adc;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
#include "catch2/catch_test_macros.hpp"
|
#include "catch2/catch_test_macros.hpp"
|
||||||
#include "catch2/generators/catch_generators.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"
|
||||||
#include "../../../../src/modules/timebase.h"
|
#include "../../../../src/modules/timebase.h"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
|
|
||||||
uint16_t millis = 0;
|
uint16_t millis = 0;
|
||||||
|
|
||||||
namespace hal {
|
namespace hal {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
#include "catch2/catch_test_macros.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>
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
using namespace modules::pulse_gen;
|
using namespace modules::pulse_gen;
|
||||||
using hal::gpio::Level;
|
using hal::gpio::Level;
|
||||||
using hal::gpio::ReadPin;
|
using hal::gpio::ReadPin;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
#include "catch2/catch_test_macros.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>
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
using namespace modules::speed_table;
|
using namespace modules::speed_table;
|
||||||
|
|
||||||
// The following reference values are calculated for 2MHz timer
|
// The following reference values are calculated for 2MHz timer
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
#include "catch2/catch_test_macros.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"
|
||||||
|
|
||||||
using Catch::Matchers::Equals;
|
|
||||||
|
|
||||||
// this is not a pure test of the real implementation (it would require splitting the timebase.cpp into 2 parts)
|
// 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.
|
// but serves the sole purpose of debugging the Elapsed() impl.
|
||||||
TEST_CASE("timebase::Elapsed", "[timebase]") {
|
TEST_CASE("timebase::Elapsed", "[timebase]") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue