GCC Code Coverage Report


Directory: ./
File: lib/my/my_find_prime_sup.c
Date: 2024-06-05 00:34:38
Exec Total Coverage
Lines: 7 7 100.0%
Functions: 1 1 100.0%
Branches: 4 4 100.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2023
3 ** my_find_prime_sup
4 ** File description:
5 ** Returns the next prime number starting form a number (nb)
6 */
7 /**
8 * @file my_find_prime_sup.c
9 * @brief The file containing the my_find_prime_sup function
10 * @author Nicolas TORO
11 */
12
13 #include "my.h"
14
15 3 int my_find_prime_sup(int nb)
16 {
17 3 int i = 0;
18
19
2/2
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 2 times.
3 if (nb <= 1)
20 1 return 2;
21
2/2
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
5 while (my_is_prime(nb + i) == 0)
22 3 i++;
23 2 return nb + i;
24 }
25