diff options
Diffstat (limited to 'tools/ftl/processors/unittest/test')
4 files changed, 23 insertions, 7 deletions
diff --git a/tools/ftl/processors/unittest/test/test_root.c.ftl b/tools/ftl/processors/unittest/test/test_root.c.ftl index b92883a55..7970a136c 100755 --- a/tools/ftl/processors/unittest/test/test_root.c.ftl +++ b/tools/ftl/processors/unittest/test/test_root.c.ftl @@ -50,14 +50,14 @@ /*===========================================================================*/
/**
- * @brief Array of all the test sequences.
+ * @brief Array of test sequences.
*/
-const testcase_t * const *${prefix_lower}test_suite[] = {
+const testsequence_t * const ${prefix_lower}test_suite_array[] = {
[#list instance.sequences.sequence as sequence]
[#if sequence.condition.value[0]?trim?length > 0]
#if (${sequence.condition.value[0]}) || defined(__DOXYGEN__)
[/#if]
- ${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")},
+ &${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")},
[#if sequence.condition.value[0]?trim?length > 0]
#endif
[/#if]
@@ -65,6 +65,14 @@ const testcase_t * const *${prefix_lower}test_suite[] = { NULL
};
+/**
+ * @brief Test suite root structure.
+ */
+const testsuite_t ${prefix_lower}test_suite = {
+ NULL,
+ ${prefix_lower}test_suite_array
+};
+
/*===========================================================================*/
/* Shared code. */
/*===========================================================================*/
diff --git a/tools/ftl/processors/unittest/test/test_root.h.ftl b/tools/ftl/processors/unittest/test/test_root.h.ftl index 8ec0a1c9d..f2498bd0a 100755 --- a/tools/ftl/processors/unittest/test/test_root.h.ftl +++ b/tools/ftl/processors/unittest/test/test_root.h.ftl @@ -30,7 +30,7 @@ /* External declarations. */
/*===========================================================================*/
-extern const testcase_t * const *${prefix_lower}test_suite[];
+extern const testsuite_t ${prefix_lower}test_suite;
#ifdef __cplusplus
extern "C" {
diff --git a/tools/ftl/processors/unittest/test/test_sequence.c.ftl b/tools/ftl/processors/unittest/test/test_sequence.c.ftl index 1eb66db90..161957603 100755 --- a/tools/ftl/processors/unittest/test/test_sequence.c.ftl +++ b/tools/ftl/processors/unittest/test/test_sequence.c.ftl @@ -191,9 +191,9 @@ static const testcase_t ${prefix_lower}test_${(sequence_index + 1)?string("000") ****************************************************************************/
/**
- * @brief ${utils.WithDot(sequence.brief.value[0]?string)}
+ * @brief Array of test cases.
*/
-const testcase_t * const ${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")}[] = {
+const testcase_t * const ${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")}_array[] = {
[#list sequence.cases.case as case]
[#if case.condition.value[0]?trim?length > 0]
#if (${case.condition.value[0]?trim}) || defined(__DOXYGEN__)
@@ -205,6 +205,14 @@ const testcase_t * const ${prefix_lower}test_sequence_${(sequence_index + 1)?str [/#list]
NULL
};
+
+/**
+ * @brief ${utils.WithDot(sequence.brief.value[0]?string)}
+ */
+const testsequence_t ${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")} = {
+ NULL,
+ ${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")}_array
+};
[#if sequence.condition.value[0]?trim?length > 0]
#endif /* ${sequence.condition.value[0]} */
diff --git a/tools/ftl/processors/unittest/test/test_sequence.h.ftl b/tools/ftl/processors/unittest/test/test_sequence.h.ftl index 088c6c44a..7a5519402 100755 --- a/tools/ftl/processors/unittest/test/test_sequence.h.ftl +++ b/tools/ftl/processors/unittest/test/test_sequence.h.ftl @@ -21,7 +21,7 @@ #ifndef ${prefix_upper}TEST_SEQUENCE_${(sequence_index + 1)?string("000")}_H
#define ${prefix_upper}TEST_SEQUENCE_${(sequence_index + 1)?string("000")}_H
-extern const testcase_t * const ${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")}[];
+extern const testsequence_t ${prefix_lower}test_sequence_${(sequence_index + 1)?string("000")};
#endif /* ${prefix_upper}TEST_SEQUENCE_${(sequence_index + 1)?string("000")}_H */
[/#list]
|