eive-obsw/unittest/controller/testAcsController.cpp

42 lines
1.1 KiB
C++
Raw Normal View History

2022-05-10 17:49:10 +02:00
#include <fsfw/ipc/QueueFactory.h>
#include <mission/controller/ThermalController.h>
#include <catch2/catch_test_macros.hpp>
#include <fstream>
#include <iostream>
#include <stdexcept>
2022-05-10 17:49:10 +02:00
#include "../testEnvironment.h"
#include "rapidcsv.h"
2022-05-11 00:42:32 +02:00
2022-05-10 17:49:10 +02:00
TEST_CASE("ACS Controller", "[AcsController]") {
SECTION("SectionTest") {
// acsCtrl.performOperation();
2022-05-10 17:49:10 +02:00
CHECK(1 == 1);
2022-05-11 00:42:32 +02:00
try {
{
std::ifstream file("unittest/meineTestDaten.txt");
if (file.good()) {
std::string line;
while (std::getline(file, line)) {
2022-05-11 00:42:32 +02:00
std::cout << "ACS CTRL Test test file: " << line << std::endl;
}
2022-05-11 00:36:31 +02:00
}
2022-05-11 00:24:58 +02:00
}
2022-05-10 17:49:10 +02:00
2022-05-11 00:42:32 +02:00
{
rapidcsv::Document doc("unittest/meineTestDaten.txt");
std::vector<int> col = doc.GetColumn<int>("test0");
std::cout << "Read " << col.size() << " values: " << col[0] << ", " << col[1] << std::endl;
}
} catch (const std::exception& e) {
sif::warning << "CSV file test exception occured: " << e.what() << std::endl;
2022-05-11 00:24:58 +02:00
}
2022-05-10 17:49:10 +02:00
REQUIRE(2 == 2);
}
SECTION("SectionTest2") {}
2022-05-10 17:49:10 +02:00
}