libtest: Return fixture context in T_case_begin()

This makes it similar to T_push_fixture().
This commit is contained in:
Sebastian Huber
2021-09-02 08:54:58 +02:00
parent e495633887
commit 34099baa9c
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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);
+2 -1
View File
@@ -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