diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-16 18:58:50 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-16 18:58:50 +0000 |
commit | 734aea5b10f4d7470d29c07ae51fbd9d9b588205 (patch) | |
tree | abe9d3be9dd9cecdf0d6dcb96863b3378742e547 /tools/ftl/processors/unittest | |
parent | 3aafb1ec45b251b45a6a52a7492b649b1ee5c41d (diff) | |
download | ChibiOS-734aea5b10f4d7470d29c07ae51fbd9d9b588205.tar.gz ChibiOS-734aea5b10f4d7470d29c07ae51fbd9d9b588205.tar.bz2 ChibiOS-734aea5b10f4d7470d29c07ae51fbd9d9b588205.zip |
Enhanced test system, not complete yet.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10837 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'tools/ftl/processors/unittest')
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]
|