rdentato / tst Goto Github PK
View Code? Open in Web Editor NEWA simple unit test framework for C.
License: MIT License
A simple unit test framework for C.
License: MIT License
Since one of the goal for tst
is to have as little footprint as possible, it might be worthwhile to check its applicability to embedded systems.
I would welcome any suggestion (or even pull requests) that would make tst
more "embedded-friendly".
Hi again !
You asked me to do some feature requests so here is a 1st one :
I can't show you the output because of NDA stuff sorry.
The feature request is using ANSI escape codes to add colors, this would help highlight running a lot of tests simultaneously it is hard to find which test passed and which one has failed.
Using ansi escape codes for colors would help a lot to retrieve this information at 1st glance.
Purple='\033[0;35m' # Purple
Blue='\033[0;34m' # Blue
Red='\033[0;31m' # Red
Cyan='\033[0;36m' # Cyan
NC='\033[0m' # No Color
# Bold
BGreen='\033[1;32m' # Green
BRed='\033[1;31m' # Red
BYellow='\033[1;33m' # Yellow
BBlue='\033[1;34m' # Blue
# High intensity
IGreen='\033[0;92m' #Green
IBlue='\033[0;94m' #Blue
IPurple='\033[0;95m' #Purple
ICyan='\033[0;96m' #Cyan
There seems an unintentional \
character in README.md L19, introduced by
commit c509905.
for a short description of each function.\
Hi @rdentato !
I'm currently working with a team on a big project on embedded system. We currently use catch2 as a testing framework which is too heavy and pulls too many dependencies.
We loved the conciseness of your code and how it is really practical and want to integrate it in our project.
Do you think that your library is mature enough to be used as today ? If so could I ask you to do a tag/release of the commit you think is the best ?
Thanks in advance and have a good day !
Greg
xUnit format is commonly used to ensure interoperability with other tools in CI/CD pipelines.
A separate program should be able to convert tst
log to xUnit XML report.
This comes from the use of FILE macro here and there
Suggestion : add FILENAME macro found here and replace every call of __FILE__
with __FILENAME__
#define __FILENAME__ (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__)
however __FILENAME__
isn't a string litteral. Hence the 2nd call must be replaced like so :
for( int tst = !( fputs( "FILE ▷ ", stderr ), fputs( __FILENAME__, stderr ), fprintf( stderr, " " __VA_ARGS__ ), fputc( '\n', stderr ), tst_init_run() ); \
tstpassed() and tstfailed() are wrongly defined to take a char * as a parameter.
They should take no argument!.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.