| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | ** EPITECH PROJECT, 2023 | ||
| 3 | ** format it | ||
| 4 | ** File description: | ||
| 5 | ** do the function linked to format | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include "my.h" | ||
| 9 | #include "myformats.h" | ||
| 10 | |||
| 11 | 64 | void format_it_double(char *str_finale, | |
| 12 | formating_t *formating, double nb) | ||
| 13 | { | ||
| 14 | 64 | void (*format[])(char *, formating_t *, double) = | |
| 15 | {&format_moins_double, &format_plus_double, | ||
| 16 | &format_esp_double, &format_hash_double, &format_zero_double}; | ||
| 17 | |||
| 18 |
4/4✓ Branch 0 taken 7 times.
✓ Branch 1 taken 57 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 6 times.
|
64 | if (formating->id_wd != -1 && formating->id_ft == -1) { |
| 19 | 1 | format[2](str_finale, formating, nb); | |
| 20 | } | ||
| 21 |
2/2✓ Branch 0 taken 320 times.
✓ Branch 1 taken 64 times.
|
384 | for (int i = 0; i < 5; i++) { |
| 22 |
2/2✓ Branch 0 taken 7 times.
✓ Branch 1 taken 313 times.
|
320 | if (formating->id_ft == i) { |
| 23 | 7 | format[i](str_finale, formating, nb); | |
| 24 | } | ||
| 25 | } | ||
| 26 | 64 | return; | |
| 27 | } | ||
| 28 |