zunitc: made name of test fixture parameter explicit.

Instead of using the implicit name 'data', changed the test
with fixture macro ZUC_TEST_F() to use an additional value
to explicitly set the name to use for test data from the
fixture.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
Jon Cruz
2015-10-22 21:11:12 -07:00
committed by Bryce Harrington
parent 2ffb0afecb
commit ecf819b82e
4 changed files with 46 additions and 31 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ static struct zuc_fixture fixture_minimal = {
.data = "for all good men to",
};
ZUC_TEST_F(fixture_minimal, just_as_is)
ZUC_TEST_F(fixture_minimal, just_as_is, data)
{
const char *str = data;
ZUC_ASSERT_NOT_NULL(str);
@@ -86,7 +86,7 @@ static struct zuc_fixture fixture_data0 = {
.tear_down = teardown_test_config
};
ZUC_TEST_F(fixture_data0, base)
ZUC_TEST_F(fixture_data0, base, data)
{
const char *str = data;
ZUC_ASSERT_NOT_NULL(str);
@@ -95,7 +95,7 @@ ZUC_TEST_F(fixture_data0, base)
}
/* Use the same fixture for a second test. */
ZUC_TEST_F(fixture_data0, no_lower)
ZUC_TEST_F(fixture_data0, no_lower, data)
{
int i;
const char *str = data;
+3 -3
View File
@@ -219,7 +219,7 @@ struct zuc_fixture complex_test = {
* but the fixture should reset that.
*/
ZUC_TEST_F(complex_test, bases_cenario)
ZUC_TEST_F(complex_test, bases_cenario, data)
{
struct fixture_data *fdata = data;
ZUC_ASSERT_NOT_NULL(fdata);
@@ -231,7 +231,7 @@ ZUC_TEST_F(complex_test, bases_cenario)
ZUC_ASSERT_EQ(2, fdata->test_counter);
}
ZUC_TEST_F(complex_test, something)
ZUC_TEST_F(complex_test, something, data)
{
struct fixture_data *fdata = data;
ZUC_ASSERT_NOT_NULL(fdata);
@@ -243,7 +243,7 @@ ZUC_TEST_F(complex_test, something)
ZUC_ASSERT_EQ(2, fdata->test_counter);
}
ZUC_TEST_F(complex_test, else_here)
ZUC_TEST_F(complex_test, else_here, data)
{
struct fixture_data *fdata = data;
ZUC_ASSERT_NOT_NULL(fdata);