[rtems commit] libtest: Return fixture context in T_case_begin()
Sebastian Huber
sebh at rtems.org
Thu Sep 2 06:53:56 UTC 2021
Module: rtems
Branch: master
Commit: 34099baa9c8fcb5fc8f7e375bc47ccd86e6fa8dd
Changeset: http://git.rtems.org/rtems/commit/?id=34099baa9c8fcb5fc8f7e375bc47ccd86e6fa8dd
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jul 28 16:29:54 2021 +0200
libtest: Return fixture context in T_case_begin()
This makes it similar to T_push_fixture().
---
cpukit/include/rtems/test.h | 2 +-
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 f95433b..305fe3f 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 910d965..0935a5c 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
More information about the vc
mailing list