mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-05 05:09:21 +02:00
gtestutils: Add g_test_get_path() API
I found myself wanting to know the test that is currently being run, where e.g. __func__ would be inconvenient to use, because e.g. the place the string was needed was not in the test case function. Using __func__ also relies on the test function itself containing the whole path, while loosing the "/" information that is part of the test path.
This commit is contained in:
@@ -338,6 +338,10 @@ void g_test_add_data_func_full (const char *testpath,
|
||||
GTestDataFunc test_func,
|
||||
GDestroyNotify data_free_func);
|
||||
|
||||
/* tell about currently run test */
|
||||
GLIB_AVAILABLE_IN_2_68
|
||||
const char * g_test_get_path (void);
|
||||
|
||||
/* tell about failure */
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
void g_test_fail (void);
|
||||
|
Reference in New Issue
Block a user