diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-07-28 16:29:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-09-02 08:54:58 +0200 |
commit | 34099baa9c8fcb5fc8f7e375bc47ccd86e6fa8dd (patch) | |
tree | 29ab68083c94b3401f6706272d751c7dcc190a6b | |
parent | bsps/imxrt: Improve SPI driver (diff) | |
download | rtems-34099baa9c8fcb5fc8f7e375bc47ccd86e6fa8dd.tar.bz2 |
libtest: Return fixture context in T_case_begin()
This makes it similar to T_push_fixture().
Diffstat (limited to '')
-rw-r--r-- | cpukit/include/rtems/test.h | 2 | ||||
-rw-r--r-- | cpukit/libtest/t-test.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/include/rtems/test.h b/cpukit/include/rtems/test.h index f95433bc7c..305fe3f5f3 100644 --- a/cpukit/include/rtems/test.h +++ b/cpukit/include/rtems/test.h @@ -2306,7 +2306,7 @@ void T_run_all(void); void T_run_by_name(const char *); -void T_case_begin(const char *, const T_fixture *); +void *T_case_begin(const char *, const T_fixture *); void T_case_end(void); diff --git a/cpukit/libtest/t-test.c b/cpukit/libtest/t-test.c index 910d965235..0935a5ceb1 100644 --- a/cpukit/libtest/t-test.c +++ b/cpukit/libtest/t-test.c @@ -1156,7 +1156,7 @@ T_run_by_name(const char *name) static T_case_context default_case; -void +void * T_case_begin(const char *name, const T_fixture *fixture) { T_case_context *tc; @@ -1165,6 +1165,7 @@ T_case_begin(const char *name, const T_fixture *fixture) tc->name = name; tc->fixture = fixture; T_do_case_begin(&T_instance, tc); + return T_instance.case_fixture.context; } void |