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 
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 }
GLsizei const GLchar *const * string
int main(int argc, char *const argv[])
GLdouble f
std::ostream & cout()
GLenum GLfloat param
static command_line_params & instance(int argc=0, char *const argv[]=0)
int i


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:17