mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-22 09:09:12 +08:00
libtest: Return fixture context in T_case_begin()
This makes it similar to T_push_fixture().
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user