Previous: , Up: C++ API Reference   [Contents][Index]


5.5 C++ Utilities Reference

C++ Macro: MICRO_BENCHMARK_MAIN ()

Declare int main (int, char **), call micro_benchmark::main and return its value.



C++ Function: void main (int argc, char* argv[])

Preconditions:

  1. argc is a non positive integer.
  2. argv points to an array of char *.
  3. argc is less or equal to the number of elements pointed by argv.
  4. Each value pointed by argv points to a valid C string.

Effects:

  1. Parse the command line:
  2. If argv contains the parameters --help, --version or an unrecognized parameter, call exit with the corresponding value.
  3. Execute the registered tests.
  4. Print the results.

Postconditions:

  1. The value returned is EXIT_SUCCESS.