PhoenixGenerator
2.0.0
Set of tools to generate code
main.cpp
Go to the documentation of this file.
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_system.h
"
12
14
void
testPhoenixSystemTime
(){
15
std::cout <<
"testPhoenixSystemTime : start = "
<<
phoenix_getClockNs
() << std::endl;
16
phoenix_assert
(
phoenix_getClock
() != 0lu);
17
phoenix_assert
(
phoenix_getClockNs
() != 0lu);
18
phoenix_assert
(
phoenix_getClockSec
() != 0.0);
19
phoenix_assert
(
phoenix_getTime
() != 0lu);
20
phoenix_assert
(
phoenix_getDate
() !=
""
);
21
phoenix_assert
(
phoenix_getDateCompact
() !=
""
);
22
phoenix_assert
(
phoenix_getNbColTerminal
() != 0lu);
23
phoenix_assert
(
phoenix_getNbRowTerminal
() != 0lu);
24
std::cout <<
"testPhoenixSystemTime : stop = "
<<
phoenix_getClockNs
() << std::endl;
25
std::cout <<
"testPhoenixSystemTime : phoenix_getDateCompact = "
<<
phoenix_getDateCompact
() << std::endl;
26
std::cout <<
"testPhoenixSystemTime : phoenix_getTime = "
<<
phoenix_getTime
() << std::endl;
27
}
28
30
void
testPhoenixWhoAmI
(){
31
phoenix_assert
(
phoenix_whoami
() !=
""
);
32
}
33
34
int
main
(
int
argc,
char
** argv){
35
testPhoenixSystemTime
();
36
testPhoenixWhoAmI
();
37
return
0;
38
}
39
40
main
int main(int argc, char **argv)
Definition:
main.cpp:19
testPhoenixSystemTime
void testPhoenixSystemTime()
Test the phoenix popen function.
Definition:
main.cpp:14
testPhoenixWhoAmI
void testPhoenixWhoAmI()
Test the phoenix_whoami.
Definition:
main.cpp:30
phoenix_assert.h
phoenix_assert
#define phoenix_assert(isOk)
Definition:
phoenix_assert.h:19
phoenix_getDateCompact
PString phoenix_getDateCompact()
Get the current date.
Definition:
phoenix_system.cpp:111
phoenix_getTime
time_t phoenix_getTime()
Get the current time of the program.
Definition:
phoenix_system.cpp:93
phoenix_getClockSec
double phoenix_getClockSec()
Get current time.
Definition:
phoenix_system.cpp:86
phoenix_getNbRowTerminal
short unsigned int phoenix_getNbRowTerminal()
Get the number of rows of the terminal.
Definition:
phoenix_system.cpp:142
phoenix_getNbColTerminal
short unsigned int phoenix_getNbColTerminal()
Get the number of columns of the terminal.
Definition:
phoenix_system.cpp:133
phoenix_getClockNs
time_t phoenix_getClockNs()
Get current time in nanosecond since the starting of the CPU (steady_clock)
Definition:
phoenix_system.cpp:68
phoenix_getClock
time_t phoenix_getClock()
Get current time.
Definition:
phoenix_system.cpp:61
phoenix_getDate
PString phoenix_getDate()
Get the current date.
Definition:
phoenix_system.cpp:100
phoenix_whoami
PString phoenix_whoami()
Get the name of the current user.
Definition:
phoenix_system.cpp:122
phoenix_system.h
tmp_project
PhoenixCore
TESTS
TEST_PHOENIX_SYSTEM
main.cpp
Generated on Fri Apr 25 2025 19:11:30 for PhoenixGenerator by
1.9.1