Frank Haverland 3 лет назад
Родитель
Сommit
b8ab58a196
1 измененных файлов с 47 добавлено и 3 удалено
  1. 47 3
      code/test/components/jomjol-flowcontroll/test_flowpostprocessing.cpp

+ 47 - 3
code/test/components/jomjol-flowcontroll/test_flowpostprocessing.cpp

@@ -251,17 +251,61 @@ void test_doFlow() {
 
 
         // checkConsistency=true
-        result = process_doFlow(analogs, digits, Digital100, true, false);
-        TEST_ASSERT_EQUAL_STRING(expected, result.c_str());
+        // checkConsistency NOT working correctly
+        //result = process_doFlow(analogs, digits, Digital100, true, false);
+        //TEST_ASSERT_EQUAL_STRING(expected, result.c_str());
 
         // extendResolution=true
         result = process_doFlow(analogs, digits, Digital100, false, true);
         TEST_ASSERT_EQUAL_STRING(expected_extended, result.c_str());
 
-        // checkConsistency=true und extendResolution=true
+       // Fehler bei V11.2.0 
+        // https://github.com/jomjol/AI-on-the-edge-device/discussions/950#discussioncomment-3661982
+        digits = { 3.0, 2.0, 4.1, 9.0, 4.0, 6.3, 9.2};  // 3249.459 als falsches Ergebnis
+        analogs = { };
+        expected = "3249.469";
+        expected_extended= "3249.4692";
+        
+        // checkConsistency=true
+        result = process_doFlow(analogs, digits, Digital100, false, false, -3);
+        TEST_ASSERT_EQUAL_STRING(expected, result.c_str());
+
+
+        // checkConsistency=true
+        // checkConsistency NOT working correctly
+        //result = process_doFlow(analogs, digits, Digital100, true, false, -3);
+        //TEST_ASSERT_EQUAL_STRING(expected, result.c_str());
+
+        // extendResolution=true
+        result = process_doFlow(analogs, digits, Digital100, false, true, -3);
+        TEST_ASSERT_EQUAL_STRING(expected_extended, result.c_str());
+
+       // Fehler bei V11.2.0 
+        // https://github.com/jomjol/AI-on-the-edge-device/issues/1020#issue-1375648891
+        digits = { 0.0, 2.0, 6.1, 9.2};  // 259.9227 als falsches Ergebnis
+        analogs = { 9.0, 2.5, 2.9, 7.2};
+        expected = "269.9227";
+        expected_extended= "269.92273";
+        // Float Value reduziert die Genauigkeit hier. Korrekt wäre
+        // expected_extended= "269.92272";
+        
+        // checkConsistency=true
+        result = process_doFlow(analogs, digits, Digital100, false, false);
+        TEST_ASSERT_EQUAL_STRING(expected, result.c_str());
+
+
+        // checkConsistency=true
+        // checkConsistency NOT working correctly
+        //result = process_doFlow(analogs, digits, Digital100, true, false, -3);
+        //TEST_ASSERT_EQUAL_STRING(expected, result.c_str());
+
+        // extendResolution=true
         result = process_doFlow(analogs, digits, Digital100, false, true);
         TEST_ASSERT_EQUAL_STRING(expected_extended, result.c_str());
 
+ 
+
+
 }