From 5a8114c6c5a076b43375a98b50cb42f70141b78e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 12 Aug 2020 16:57:39 +0200 Subject: libtest: Change fixture scope method Return the produced character count. There is no need for a NUL termination. Update #3199. --- cpukit/include/rtems/test.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cpukit/include/rtems/test.h') diff --git a/cpukit/include/rtems/test.h b/cpukit/include/rtems/test.h index 18aafbcf7c..a3900c1285 100644 --- a/cpukit/include/rtems/test.h +++ b/cpukit/include/rtems/test.h @@ -62,7 +62,7 @@ typedef struct T_fixture { void (*setup)(void *); void (*stop)(void *); void (*teardown)(void *); - void (*scope)(void *, char *, size_t); + size_t (*scope)(void *, char *, size_t); void *initial_context; } T_fixture; @@ -2324,14 +2324,19 @@ T_NO_RETURN void T_stop(void); * * @param second_indices is an array of indices defining which descriptive * string is used for each entry in the description table. + * + * @return Returns the characters consumed from the buffer for the produced + * scope. */ -void T_get_scope( +size_t T_get_scope( const char * const * const *desc, char *buf, size_t n, const size_t *second_indices ); +size_t T_str_copy(char *, const char *, size_t); + #ifdef __rtems__ #define T_TEST_CASE_FIXTURE(name, fixture) \ void T_case_body_##name(void); \ -- cgit v1.2.3