* g_test_quick:
*
* Returns %TRUE if tests are run in quick mode.
+ * Exactly one of g_test_quick() and g_test_slow() is active in any run;
+ * there is no "medium speed".
*
* Returns: %TRUE if in quick mode
*/
* g_test_slow:
*
* Returns %TRUE if tests are run in slow mode.
+ * Exactly one of g_test_quick() and g_test_slow() is active in any run;
+ * there is no "medium speed".
*
- * Returns: %TRUE if in slow mode
+ * Returns: the opposite of g_test_quick()
*/
/**
* g_test_thorough:
*
- * Returns %TRUE if tests are run in thorough mode.
+ * Returns %TRUE if tests are run in thorough mode, equivalent to
+ * g_test_slow().
*
- * Returns: %TRUE if in thorough mode
+ * Returns: the same thing as g_test_slow()
*/
/**
*/
/**
+ * g_test_undefined:
+ *
+ * Returns %TRUE if tests may provoke assertions and other formally-undefined
+ * behaviour under g_test_trap_fork(), to verify that appropriate warnings
+ * are given. It can be useful to turn this off if running tests under
+ * valgrind.
+ *
+ * Returns: %TRUE if tests may provoke programming errors
+ */
+
+/**
* g_test_verbose:
*
* Returns %TRUE if tests are run in verbose mode.
+ * The default is neither g_test_verbose() nor g_test_quiet().
*
* Returns: %TRUE if in verbose mode
*/
* g_test_quiet:
*
* Returns %TRUE if tests are run in quiet mode.
+ * The default is neither g_test_verbose() nor g_test_quiet().
*
- * Returns: %TRUE if in quied mode
+ * Returns: %TRUE if in quiet mode
*/
/**
FALSE, /* test_perf */
FALSE, /* test_verbose */
FALSE, /* test_quiet */
+ TRUE, /* test_undefined */
};
const GTestConfig * const g_test_config_vars = &mutable_test_config_vars;
mutable_test_config_vars.test_quick = TRUE;
mutable_test_config_vars.test_perf = FALSE;
}
+ else if (strcmp (mode, "undefined") == 0)
+ mutable_test_config_vars.test_undefined = TRUE;
+ else if (strcmp (mode, "no-undefined") == 0)
+ mutable_test_config_vars.test_undefined = FALSE;
else
g_error ("unknown test mode: -m %s", mode);
argv[i] = NULL;
" -p TESTPATH execute all tests matching TESTPATH\n"
" -s TESTPATH skip all tests matching TESTPATH\n"
" -m {perf|slow|thorough|quick} Execute tests according modes\n"
+ " -m {undefined|no-undefined} Execute tests according modes\n"
" --debug-log debug test logging output\n"
" -k, --keep-going gtester-specific argument\n"
" --GTestLogFD=N gtester-specific argument\n"
* </para></listitem>
* </varlistentry>
* <varlistentry>
- * <term><option>-m {perf|slow|thorough|quick}</option></term>
+ * <term><option>-m {perf|slow|thorough|quick|undefined|no-undefined}</option></term>
* <listitem><para>
* execute tests according to these test modes:
* <variablelist>
* quick tests, should run really quickly and give good coverage.
* </para></listitem>
* </varlistentry>
+ * <varlistentry>
+ * <term>undefined</term>
+ * <listitem><para>
+ * tests for undefined behaviour, may provoke programming errors
+ * under g_test_trap_fork() to check that appropriate assertions
+ * or warnings are given
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>no-undefined</term>
+ * <listitem><para>
+ * avoid tests for undefined behaviour
+ * </para></listitem>
+ * </varlistentry>
* </variablelist>
* </para></listitem>
* </varlistentry>