GCC Code Coverage Report


Directory: ./
File: TESTS/TEST_REGEXPR/main.cpp
Date: 2024-11-14 16:05:39
Exec Total Coverage
Lines: 11 11 100.0%
Branches: 42 42 100.0%

Line Branch Exec Source
1
2 /***************************************
3 Auteur : Pierre Aubert
4 Mail : pierre.aubert@lapp.in2p3.fr
5 Licence : CeCILL-C
6 ****************************************/
7
8 #include <iostream>
9 #include "phoenix_assert.h"
10 #include "string_system.h"
11
12 ///Test the is lower/upper case
13 1 void testRegExpr(){
14
7/7
✓ Branch 2 taken 1 times.
✓ Branch 6 taken 1 times.
✓ Branch 10 taken 1 times.
✓ Branch 14 taken 1 times.
✓ Branch 18 taken 1 times.
✓ Branch 21 taken 1 times.
✓ Branch 24 taken 1 times.
1 phoenix_assert(!isStringMatchRegex("", ""));
15
7/7
✓ Branch 2 taken 1 times.
✓ Branch 6 taken 1 times.
✓ Branch 10 taken 1 times.
✓ Branch 14 taken 1 times.
✓ Branch 18 taken 1 times.
✓ Branch 21 taken 1 times.
✓ Branch 24 taken 1 times.
1 phoenix_assert(isStringMatchRegex("agoihoicffEZEFjffz", "[:alpha:]"));
16
7/7
✓ Branch 2 taken 1 times.
✓ Branch 6 taken 1 times.
✓ Branch 10 taken 1 times.
✓ Branch 14 taken 1 times.
✓ Branch 18 taken 1 times.
✓ Branch 21 taken 1 times.
✓ Branch 24 taken 1 times.
1 phoenix_assert(isStringMatchRegex("1092095235", "[0-9]"));
17
7/7
✓ Branch 2 taken 1 times.
✓ Branch 6 taken 1 times.
✓ Branch 10 taken 1 times.
✓ Branch 14 taken 1 times.
✓ Branch 18 taken 1 times.
✓ Branch 21 taken 1 times.
✓ Branch 24 taken 1 times.
1 phoenix_assert(isStringMatchRegex("fjafzaofazofjaz", "[a-z]"));
18
7/7
✓ Branch 2 taken 1 times.
✓ Branch 6 taken 1 times.
✓ Branch 10 taken 1 times.
✓ Branch 14 taken 1 times.
✓ Branch 18 taken 1 times.
✓ Branch 21 taken 1 times.
✓ Branch 24 taken 1 times.
1 phoenix_assert(isStringMatchRegex("EOJZEPFJGOEPGJPS", "[A-Z]"));
19
7/7
✓ Branch 2 taken 1 times.
✓ Branch 6 taken 1 times.
✓ Branch 10 taken 1 times.
✓ Branch 14 taken 1 times.
✓ Branch 18 taken 1 times.
✓ Branch 21 taken 1 times.
✓ Branch 24 taken 1 times.
1 phoenix_assert(!isStringMatchRegex("1092095235", "[a-z]"));
20 1 }
21
22 1 int main(int argc, char** argv){
23 1 testRegExpr();
24 1 return 0;
25 }
26
27
28