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_getFileSize.h" |
10 |
|
|
|
11 |
|
|
///Test the whoami function |
12 |
|
|
/** @return true on success, false otherwise |
13 |
|
|
*/ |
14 |
|
1 |
bool testStringFileSize(){ |
15 |
|
1 |
bool b(true); |
16 |
✓✓ |
1 |
size_t fileSize(phoenix_getFileSize("Makefile")); |
17 |
|
1 |
b &= fileSize != 0lu; |
18 |
✓✓ |
1 |
b &= phoenix_getFileSize("UnexistingFile.txt") == 0lu; |
19 |
|
1 |
std::cout << "testStringFileSize : b = " << b << std::endl; |
20 |
|
1 |
return b; |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
|
24 |
|
1 |
int main(int argc, char** argv){ |
25 |
|
1 |
bool b(true); |
26 |
|
1 |
b &= testStringFileSize(); |
27 |
|
1 |
std::cout << "Final : b = " << b << std::endl; |
28 |
|
1 |
return b - 1; |
29 |
|
|
} |
30 |
|
|
|
31 |
|
|
|