remove testing code, minor

This commit is contained in:
2025-07-09 10:22:31 +02:00
parent 767555c5cc
commit e0aadbcc0f
2 changed files with 3 additions and 8 deletions

View File

@@ -11,6 +11,7 @@
#include <cstring>
#include <unistd.h>
/** for testing */
ParsedOptions CommandLineOptions::parse(const std::vector<std::string> &args) {
std::vector<char *> argv;
argv.reserve(args.size());
@@ -23,15 +24,12 @@ ParsedOptions CommandLineOptions::parse(const std::vector<std::string> &args) {
ParsedOptions CommandLineOptions::parse(int argc, char *argv[]) {
CommonOptions base;
base.port = DEFAULT_TCP_RX_PORTNO;
MultiReceiverOptions multi;
FrameSyncOptions frame;
base.port = DEFAULT_TCP_RX_PORTNO;
// leading '+' to stop parsing at first non-option argument (to allow for deprecated options)
auto optString = "+" + buildOptString();
auto optString = buildOptString();
auto longOptions = buildOptionList();
optind = 0; // reset getopt
int opt, option_index = 0;

View File

@@ -29,9 +29,6 @@ Receiver::~Receiver() = default;
Receiver::Receiver(uint16_t port) {
validatePortNumber(port);
//#ifdef SLS_USE_TESTS
if (port == 9999) throw RuntimeError("throwing for 9999 test");
//#endif
tcpipInterface = make_unique<ClientInterface>(port);
}