fix regression tests

This commit is contained in:
Frank Haverland
2022-10-26 20:10:19 +02:00
parent c8bb95a852
commit 116c99e55c
4 changed files with 31 additions and 22 deletions

View File

@@ -6,7 +6,7 @@
#include <ClassFlowCNNGeneral.h>
#include <ClassFlowCNNGeneral.h>
#include <ClassFlowMakeImage.h>
#include <Helper.h>
class UnderTestPost : public ClassFlowPostProcessing {
@@ -15,7 +15,6 @@ class UnderTestPost : public ClassFlowPostProcessing {
: ClassFlowPostProcessing::ClassFlowPostProcessing(lfc, _analog, _digit) {}
using ClassFlowPostProcessing::InitNUMBERS;
using ClassFlowPostProcessing::RundeOutput;
using ClassFlowPostProcessing::flowAnalog;
using ClassFlowPostProcessing::flowDigit;
@@ -107,4 +106,12 @@ void setDecimalShift(UnderTestPost* _UnderTestPost, int decimal_shift);
*/
void setAnalogdigitTransistionStart(UnderTestPost* _underTestPost, float _analogdigitTransistionStart);
/**
* @brief Set the allowNegatives in testobject
*
* @param _underTestPost the testobject
* @param _allowNegatives if should be set true or false
*/
void setAllowNegatives(UnderTestPost* _underTestPost, bool _allowNegatives);
#endif // TEST_FLOW_H

View File

@@ -2,6 +2,7 @@
/**
* @brief Testfall für Überprüfung allowNegatives
*
@@ -33,7 +34,7 @@ void testNegative() {
setPreValue(underTestPost, preValue_extended);
result = process_doFlow(underTestPost);
TEST_ASSERT_EQUAL_STRING("no error", underTestPost->getReadoutError().c_str());
TEST_ASSERT_EQUAL_STRING(underTestPost->RundeOutput(preValue_extended, analogs.size()+1).c_str(), result.c_str());
TEST_ASSERT_EQUAL_STRING(RundeOutput(preValue_extended, analogs.size()+1).c_str(), result.c_str());
delete underTestPost;
// extendResolution=true