LCOV - code coverage report
Current view: top level - unit-tests - params_tests.cxx (source / functions) Hit Total Coverage
Test: code_coverage_filter.info Lines: 9 9 100.0 %
Date: 2024-03-28 16:04:17 Functions: 6 6 100.0 %
Branches: 23 62 37.1 %

           Branch data     Line data    Source code
       1                 :            : /**
       2                 :            :  * Includes tests related to different input parametes for PDT-SPACE.
       3                 :            :  * 
       4                 :            :  *      @author: Abed Yassine
       5                 :            :  *      @date: August 10th, 2020
       6                 :            :  */
       7                 :            : 
       8                 :            : #include "gtest/gtest.h"
       9                 :            : #include "pdt_plan.h"
      10                 :            : #include "test_common.h"
      11                 :            : 
      12                 :            : #include <vector>
      13                 :            : 
      14                 :            : #define PARAMS_FILES_DIR "/unit-tests/input_params/test_params/"
      15                 :            : 
      16 [ +  - ][ +  - ]:         32 : GTEST_TEST(ParamsTests, VaryTumorWeightTests)
         [ +  - ][ -  + ]
      17                 :            : {
      18                 :            :     /** Run PDT_SPACE  with target tumor coverage of 95%*/
      19 [ +  - ][ +  - ]:          4 :     pdt_plan* plan = new pdt_plan(string(PDT_SPACE_SRC_DIR) + PARAMS_FILES_DIR + "target_tumor_weight_95.xml");
         [ +  - ][ +  - ]
                 [ +  - ]
      20                 :            : 
      21         [ +  - ]:          8 :     vector<double> v_alpha = run_pdt_space(plan);
      22                 :            : 
      23                 :            :     // Expecting tumor v100 to be around 95%
      24 [ +  - ][ -  + ]:          4 :     EXPECT_NEAR(v_alpha[4], 95.0, 0.1) << "Testing 95\% tumor target coverage"; 
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
      25                 :            : 
      26         [ +  - ]:          4 :     delete plan;
      27                 :            : 
      28                 :            :     /** Run PDT_SPACE  with target tumor coverage of 98%*/
      29 [ +  - ][ +  - ]:          4 :     plan = new pdt_plan(string(PDT_SPACE_SRC_DIR) + PARAMS_FILES_DIR + "target_tumor_weight_98.xml");
         [ +  - ][ +  - ]
                 [ +  - ]
      30                 :            : 
      31         [ +  - ]:          4 :     v_alpha = run_pdt_space(plan);
      32                 :            : 
      33                 :            :     // Expecting tumor v100 to be around 98%
      34 [ +  - ][ -  + ]:          4 :     EXPECT_NEAR(v_alpha[4], 98.0, 0.1) << "Testing 98\% tumor target coverage"; 
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
      35 [ +  - ][ +  - ]:         20 : }

Generated by: LCOV version 1.12