init


Description:

public void init (ref string[] args, ...)

Initialize the GLib testing framework, e.

g. by seeding the test random number generator, the name for get_prgname and parsing test related command line args.

So far, the following arguments are understood:

  • `-l`: List test cases available in a test executable.
  • `--seed=SEED`: Provide a random seed to reproduce test runs using random numbers.
  • `--verbose`: Run tests verbosely.
  • `-q`, `--quiet`: Run tests quietly.
  • `-p PATH`: Execute all tests matching the given path. This can also be used to force a test to run that would otherwise be skipped ( ie, a test whose name contains "/subprocess").
  • `-m {perf|slow|thorough|quick|undefined|no-undefined}`: Execute tests according to these test modes:

    `perf`: Performance tests, may take long and report results.

    `slow`, `thorough`: Slow and thorough tests, may take quite long and maximize coverage.

    `quick`: Quick tests, should run really quickly and give good coverage.

    `undefined`: Tests for undefined behaviour, may provoke programming errors under trap_subprocess or g_test_expect_messages to check that appropriate assertions or warnings are given

    `no-undefined`: Avoid tests for undefined behaviour

  • `--debug-log`: Debug test logging output.

Parameters:

...

null-terminated list of special options. Currently the only defined option is `"no_g_set_prgname"`, which will cause init to not call set_prgname.

argc

Address of the argc parameter of the main function. Changed if any arguments were handled.

argv

Address of the argv parameter of main. Any parameters understood by init stripped before return.


Namespace: GLib.Test
Package: glib-2.0