Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MojitOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
MojitOS
Commits
0c9216ed
Commit
0c9216ed
authored
2 years ago
by
FlorealRISSO
Browse files
Options
Downloads
Patches
Plain Diff
format
parent
189f9fc7
No related branches found
No related tags found
4 merge requests
!9
fix sensor example (doc)
,
!4
Amd, Tests, Doc, CI/CD
,
!2
build system (v0), add long options
,
!1
build system (v0), add long options, corrections
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/small_test.h
+19
-19
19 additions, 19 deletions
tests/small_test.h
with
19 additions
and
19 deletions
tests/small_test.h
+
19
−
19
View file @
0c9216ed
...
...
@@ -39,15 +39,15 @@
* @param __code The code that contains the calls to the test functions.
*/
#define TMAIN(__code)
\
int main()
\
{
\
unsigned int __indentation_level = 0;
\
INDENTED_PRINT("%s:%s\n", __FILE__, __func__);
\
unsigned int __error_counter__ = 0;
\
do __code while (0);
\
DEFERRED_ERROR(__error_counter__);
\
return __error_counter__;
\
#define TMAIN(__code) \
int main() \
{ \
unsigned int __indentation_level = 0; \
INDENTED_PRINT("%s:%s\n", __FILE__, __func__); \
unsigned int __error_counter__ = 0; \
do __code while (0); \
DEFERRED_ERROR(__error_counter__); \
return __error_counter__; \
}
/**
...
...
@@ -72,7 +72,7 @@
INIT_TEST_FILE(); \
int __error_counter__ = 0; \
do __code while(0); \
DEFERRED_ERROR(__error_counter__); \
DEFERRED_ERROR(__error_counter__);
\
return __error_counter__; \
}
...
...
@@ -91,14 +91,14 @@
* @param __function_name The name of the test function.
* @param __code The test code to be executed in the function.
*/
#define TFUNCTION(__function_name, __code) \
#define TFUNCTION(__function_name, __code)
\
int __function_name(unsigned int __indentation_level) \
{ \
INIT_TEST_FUNCTION(); \
int __error_counter__ = 0; \
do __code while(0); \
DEFERRED_ERROR(__error_counter__); \
return __error_counter__; \
{
\
INIT_TEST_FUNCTION();
\
int __error_counter__ = 0;
\
do __code while(0);
\
DEFERRED_ERROR(__error_counter__);
\
return __error_counter__;
\
}
/**
...
...
@@ -236,13 +236,13 @@
#define INDENTED_PRINT(__fmt, ...) \
do { \
for(unsigned int i = 0; i < __indentation_level; i++) { \
printf("| ");
\
printf("| "); \
} \
printf(__fmt, ##__VA_ARGS__); \
} while(0)
#define INIT_TEST_FILE()
\
#define INIT_TEST_FILE() \
INDENTED_PRINT("%s:%s\n", __FILE__, __func__)
#define INIT_TEST_FUNCTION() \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment