| Directory: | ./ |
|---|---|
| File: | tmp_project/PhoenixString/TESTS/TEST_FILE_BEGINING/main.cpp |
| Date: | 2024-12-09 15:28:54 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 10 | 10 | 100.0% |
| Branches: | 35 | 35 | 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 <vector> | ||
| 10 | #include "phoenix_assert.h" | ||
| 11 | #include "phoenix_check.h" | ||
| 12 | |||
| 13 | #include "string_filename.h" | ||
| 14 | |||
| 15 | ///Test the checkFileBegning | ||
| 16 | 1 | void testFileBegning(){ | |
| 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(saveFileContent("testFile.txt", "some file content")); |
| 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(checkFileBegning("", "") == false); |
| 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(checkFileBegning("UnexistingFile", "") == false); |
| 20 |
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(checkFileBegning("testFile.txt", "# Not the match") == false); |
| 21 |
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(checkFileBegning("testFile.txt", "some file") == true); |
| 22 | 1 | } | |
| 23 | |||
| 24 | 1 | int main(int argc, char** argv){ | |
| 25 | 1 | testFileBegning(); | |
| 26 | 1 | return 0; | |
| 27 | } | ||
| 28 | |||
| 29 | |||
| 30 |