barbu110 / ctest Goto Github PK
View Code? Open in Web Editor NEWsmall testing utility for C programs
License: MIT License
small testing utility for C programs
License: MIT License
The following assertions should be implemented in assertions.h
:
ASSERT_EQ
)ASSERT_NE
)ASSERT_LT
)ASSERT_GT
)ASSERT_LTE
)ASSERT_GTE
)ASSERT_ZERO
, ASSERT_SUCCESS
); the successful status comes from the philosophy of Unix syscalls which return 0 on successASSERT_STRCMP(a, b, expected_relation)
)ASSERT_FLOAT_EQ
)The library should provide a main
function for the test executables.
The program should accept the following command line arguments:
--all
or -a
to run all the registered tests--suite <suite_name>
or -s <suite_name>
to run all the tests registered within the given suite_name
--failed
to skip running the tests that failed on the last runFailed assertions should leave the test in a FAILED state and should not allow the execution to continue.
Required changes:
The test function should receive an assertion_runner_fn
instead of an assertion_container
. This will not only help in the above mentioned problem, but also eliminate the limitation created by MAX_ASSERTIONS_PER_TEST
definition.
The assertion_runner_fn
should be defined as follows:
typedef int (*assertion_runner_fn)(struct assertion *);
This function should return 0
when the assertion successes and 1
when the assertion fails (similar to Unix syscalls).
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.