GCC Code Coverage Report


Directory: ./
File: src/TraitBackEnd/Nanobind/NanobindTraitTestSetup/NanobindTraitTestSetup.cpp
Date: 2026-09-08 15:48:42
Exec Total Coverage
Lines: 12 12 100.0%
Functions: 4 4 100.0%
Branches: 15 15 100.0%

Line Branch Exec Source
1 /***************************************
2 Auteur : Thibaut Oprinsen
3 Mail : thibaut.oprinsen@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7 #include "NanobindTraitTestSetup.h"
8
9 ///Constructor of NanobindTraitTestSetup
10 1 NanobindTraitTestSetup::NanobindTraitTestSetup()
11 1 : PAbstractNanobindTraitBackend()
12 1 {}
13
14 ///Destructor of NanobindTraitTestSetup
15 2 NanobindTraitTestSetup::~NanobindTraitTestSetup(){}
16
17 ///Registration of static method
18 4 void NanobindTraitTestSetup::headerTestInclude(std::ofstream & fs, const GeneratorMode & mode, const PString & baseFileName) const{
19
1/1
✓ Branch 0 (2→3) taken 4 times.
4 PString fileModule = baseFileName.toLower();
20
2/2
✓ Branch 0 (3→4) taken 4 times.
✓ Branch 2 (4→5) taken 4 times.
4 fs << "#!/usr/bin/env python3" << std::endl;
21
5/5
✓ Branch 0 (5→6) taken 4 times.
✓ Branch 2 (6→7) taken 4 times.
✓ Branch 4 (7→8) taken 4 times.
✓ Branch 6 (8→9) taken 4 times.
✓ Branch 8 (9→10) taken 4 times.
4 fs << "\"\"\"Test script for " << fileModule << " nanobind wrapper\"\"\"" << std::endl << std::endl;
22
3/3
✓ Branch 0 (10→11) taken 4 times.
✓ Branch 2 (11→12) taken 4 times.
✓ Branch 4 (12→13) taken 4 times.
4 fs << "import pytest" << std::endl << std::endl;
23
3/3
✓ Branch 0 (13→14) taken 4 times.
✓ Branch 2 (14→15) taken 4 times.
✓ Branch 4 (15→16) taken 4 times.
4 fs << "import " << fileModule << std::endl;
24
1/1
✓ Branch 0 (16→17) taken 4 times.
4 fs << std::endl;
25 4 }
26