Procházet zdrojové kódy

added test cases from rainman110:fix_issue_2857

Frank Haverland před 2 roky
rodič
revize
57715b5bdd

+ 2 - 0
code/test/components/jomjol-flowcontroll/test_flowpostprocessing.cpp

@@ -656,6 +656,7 @@ void test_doFlowIssue2857()
 
     // FrankCGN01
     decimalShift = -3;
+    a2dt = 9.0;
     TEST_ASSERT_EQUAL_STRING("159.3659", postProcess({ 0.9, 4.8, 9.0, 3.0, 6.0, 5.0}, { 9.6},
                                                     a2dt, decimalShift).c_str());
 
@@ -709,6 +710,7 @@ void test_doFlowLateTransitionHanging()
 
 void test_doFlowPP_rainman110()
 {
+
     // https://github.com/jomjol/AI-on-the-edge-device/issues/2743
     // --> Extreme early digit transition. AnanlogDigitTransition needs to set to 3.5 (was limited to 6)
     std::vector<float> digits = {4.0, 1.0, 1.8};  // wrong result: 412.3983

+ 10 - 0
code/test/test_suite_flowcontroll.cpp

@@ -139,6 +139,16 @@ void task_UnityTesting(void *pvParameter)
         printf("---------------------------------------------------------------------------\n");
         RUN_TEST(test_doFlowPP4);
         printf("---------------------------------------------------------------------------\n");
+        RUN_TEST(test_doFlowLateTransition);
+        printf("---------------------------------------------------------------------------\n");
+        RUN_TEST(test_doFlowEarlyTransition);
+        printf("---------------------------------------------------------------------------\n");
+        RUN_TEST(test_doFlowEarlyTransitionEdgeCase);
+        printf("---------------------------------------------------------------------------\n");
+        RUN_TEST(test_doFlowIssue2857);
+        printf("---------------------------------------------------------------------------\n");
+        RUN_TEST(test_doFlowLateTransitionHanging);
+        printf("---------------------------------------------------------------------------\n");
         RUN_TEST(test_doFlowPP_rainman110);
         printf("---------------------------------------------------------------------------\n");
         RUN_TEST(test_doFlowPP_rainman110_transition);