summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/test.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/include/rtems/test.h50
1 files changed, 34 insertions, 16 deletions
diff --git a/cpukit/include/rtems/test.h b/cpukit/include/rtems/test.h
index 305fe3f5f3..b8e7934883 100644
--- a/cpukit/include/rtems/test.h
+++ b/cpukit/include/rtems/test.h
@@ -1,7 +1,16 @@
-/*
- * SPDX-License-Identifier: BSD-2-Clause
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
*
- * Copyright (C) 2017, 2021 embedded brains GmbH
+ * @ingroup RTEMSTestFramework
+ *
+ * @brief This header file provides interfaces of the
+ * RTEMS Test Framework.
+ */
+
+/*
+ * Copyright (C) 2017, 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -77,6 +86,11 @@ typedef struct T_fixture_node {
unsigned int failures;
} T_fixture_node;
+typedef struct T_remark {
+ struct T_remark *next;
+ const char *remark;
+} T_remark;
+
#define T_ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
/*
@@ -98,7 +112,7 @@ typedef struct T_fixture_node {
/**
* @defgroup RTEMSTestFrameworkImpl RTEMS Test Framework Implementation
*
- * @ingroup RTEMSTestFramework
+ * @ingroup RTEMSImpl
*
* @brief Implementation details.
*
@@ -187,42 +201,42 @@ extern const T_check_context T_special;
T_flags_true(flags, \
(a) != (T_VA_ARGS_FIRST(__VA_ARGS__)) T_VA_ARGS_MORE(__VA_ARGS__))
-void T_check_eq_ptr(const T_check_context_msg *, const void *, const void *);
+void T_check_eq_ptr(const T_check_context_msg *, uintptr_t, uintptr_t);
#define T_flags_eq_ptr(a, e, flags, sa, se) \
{ \
static const T_check_context_msg T_check_instance = { \
{ T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, \
sa " == " se }; \
- T_check_eq_ptr(&T_check_instance, a, e); \
+ T_check_eq_ptr(&T_check_instance, (uintptr_t)a, (uintptr_t)e); \
}
-void T_check_ne_ptr(const T_check_context_msg *, const void *, const void *);
+void T_check_ne_ptr(const T_check_context_msg *, uintptr_t, uintptr_t);
#define T_flags_ne_ptr(a, e, flags, sa, se) \
{ \
static const T_check_context_msg T_check_instance = { \
{ T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, \
sa " != " se }; \
- T_check_ne_ptr(&T_check_instance, a, e); \
+ T_check_ne_ptr(&T_check_instance, (uintptr_t)a, (uintptr_t)e); \
}
-void T_check_null(const T_check_context_msg *, const void *);
+void T_check_null(const T_check_context_msg *, uintptr_t);
#define T_flags_null(a, flags, sa) \
{ \
static const T_check_context_msg T_check_instance = { \
{ T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, sa }; \
- T_check_null(&T_check_instance, a); \
+ T_check_null(&T_check_instance, (uintptr_t)a); \
}
-void T_check_not_null(const T_check_context_msg *, const void *);
+void T_check_not_null(const T_check_context_msg *, uintptr_t);
#define T_flags_not_null(a, flags, sa) \
{ \
static const T_check_context_msg T_check_instance = { \
{ T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, sa }; \
- T_check_not_null(&T_check_instance, a); \
+ T_check_not_null(&T_check_instance, (uintptr_t)a); \
}
void T_check_eq_mem(const T_check_context_msg *, const void *, const void *,
@@ -1322,7 +1336,7 @@ T_verbosity T_set_verbosity(T_verbosity);
/** @} */
/**
- * @defgroup RTEMSTestFrameworkChecksLong Signed Long Long Integer Checks
+ * @defgroup RTEMSTestFrameworkChecksLongLong Signed Long Long Integer Checks
*
* @ingroup RTEMSTestFramework
*
@@ -2318,6 +2332,8 @@ void *T_fixture_context(void);
void T_set_fixture_context(void *);
+void T_add_remark(T_remark *);
+
void *T_push_fixture(T_fixture_node *, const T_fixture *);
void T_pop_fixture(void);
@@ -2365,8 +2381,8 @@ T_case_context T_case_instance_##name = { \
NULL \
}; \
static T_case_context * const T_case_item_##name \
-__attribute((__section__(".rtemsroset._T.content.0." #name))) \
-__attribute((__used__)) = &T_case_instance_##name; \
+__attribute__((__section__(".rtemsroset._T.content.0." #name))) \
+__attribute__((__used__)) = &T_case_instance_##name; \
void T_case_body_##name(void)
#else /* __rtems__ */
#define T_TEST_CASE_FIXTURE(name, fixture) \
@@ -2377,7 +2393,7 @@ T_case_context T_case_instance_##name = { \
fixture, \
NULL \
}; \
-__attribute((__constructor__)) static void \
+__attribute__((__constructor__)) static void \
T_case_register_##name(void) \
{ \
T_case_register(&T_case_instance_##name); \
@@ -2464,6 +2480,8 @@ T_thread_switch_log *T_thread_switch_record_10(T_thread_switch_log_10 *);
void T_report_hash_sha256(T_event, const char *);
+void T_report_hash_sha256_update(char c);
+
void T_check_heap(T_event, const char *);
#ifdef __rtems__