Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
unit-tests
internal
internal-tests-main.cpp
Go to the documentation of this file.
1
#define CATCH_CONFIG_RUNNER
2
#include "
unit-tests-common.h
"
3
#include <iostream>
4
5
int
main
(
int
argc,
char
*
const
argv[])
6
{
7
8
command_line_params::instance
(argc, argv);
9
10
std::vector<char*> new_argvs;
11
12
std::cout
<<
"Running tests with the following parameters: "
;
13
for
(
auto
i
= 0;
i
< argc;
i
++)
14
{
15
std::string
param
(argv[
i
]);
16
std::cout
<< param <<
" "
;
17
}
18
std::cout
<< std::endl;
19
20
for
(
auto
i
= 0;
i
< argc;
i
++)
21
{
22
std::string
param
(argv[
i
]);
23
if
(param !=
"into"
&& param !=
"from"
)
24
{
25
new_argvs.push_back(argv[i]);
26
}
27
else
28
{
29
i++;
30
if
(i < argc && param ==
"from"
)
31
{
32
auto
filename
= argv[
i
];
33
std::ifstream
f
(
filename
);
34
if
(!f.good())
35
{
36
std::cout
<<
"Could not load "
<<
filename
<<
"!"
<< std::endl;
37
return
EXIT_FAILURE;
38
}
39
}
40
}
41
}
42
43
return
Catch::Session().run(static_cast<int>(new_argvs.size()), new_argvs.data());
44
}
string
GLsizei const GLchar *const * string
Definition:
glad/glad/glad.h:2862
main
int main(int argc, char *const argv[])
Definition:
internal-tests-main.cpp:5
f
GLdouble f
Definition:
glad/glad/glad.h:1518
Catch::cout
std::ostream & cout()
unit-tests-common.h
param
GLenum GLfloat param
Definition:
glad/glad/glad.h:1401
command_line_params::instance
static command_line_params & instance(int argc=0, char *const argv[]=0)
Definition:
unit-tests-common.h:299
test-non-realtime.filename
string filename
Definition:
test-non-realtime.py:17
i
int i
Definition:
rs-pcl-color.cpp:54
librealsense2
Author(s): Sergey Dorodnicov
, Doron Hirshberg
, Mark Horn
, Reagan Lopez
, Itay Carpis
autogenerated on Mon May 3 2021 02:47:17