Lines Matching +full:sample +full:- +full:point +full:- +full:data
4 * SPDX-License-Identifier: Apache-2.0
23 zassert_not_ok(-EIO); in ZTEST()
71 * Sample fixture tests
93 * Sample rule tests
110 static void rule_before_each(const struct ztest_unit_test *test, void *data) in rule_before_each() argument
112 if (strcmp(test->test_suite_name, "rules_tests") == 0 && in rule_before_each()
113 strcmp(test->name, "test_rules_before_after") == 0) { in rule_before_each()
114 struct rules_tests_fixture *fixture = data; in rule_before_each()
116 zassert_equal_ptr(&rule_tests_fixture, data, in rule_before_each()
117 "Data expected to point to rule_state"); in rule_before_each()
118 if (fixture->run_count == 0) { in rule_before_each()
119 zassert_equal(fixture->state, RULE_STATE_SETUP, "Unexpected state"); in rule_before_each()
121 zassert_equal(fixture->state, RULE_STATE_AFTER_EACH, "Unexpected state"); in rule_before_each()
123 fixture->state = RULE_STATE_BEFORE_EACH; in rule_before_each()
127 static void rule_after_each(const struct ztest_unit_test *test, void *data) in rule_after_each() argument
129 if (strcmp(test->test_suite_name, "rules_tests") == 0 && in rule_after_each()
130 strcmp(test->name, "test_rules_before_after") == 0) { in rule_after_each()
131 struct rules_tests_fixture *fixture = data; in rule_after_each()
133 zassert_equal_ptr(&rule_tests_fixture, data, in rule_after_each()
134 "Data expected to point to rule_state"); in rule_after_each()
135 zassert_equal(fixture->state, RULE_STATE_TEST, "Unexpected state"); in rule_after_each()
136 fixture->state = RULE_STATE_AFTER_EACH; in rule_after_each()
147 static void rule_test_teardown(void *data) in rule_test_teardown() argument
149 struct rules_tests_fixture *fixture = data; in rule_test_teardown()
155 zassert_equal(fixture->state, RULE_STATE_AFTER_EACH, "Unexpected state"); in rule_test_teardown()
157 zassert_equal(fixture->run_count, CONFIG_ZTEST_TEST_REPEAT_COUNT); in rule_test_teardown()
167 zassert_equal(fixture->state, RULE_STATE_BEFORE_EACH, in ZTEST_F()
169 fixture->state = RULE_STATE_TEST; in ZTEST_F()
170 fixture->run_count++; in ZTEST_F()