nandgate / unittest Goto Github PK
View Code? Open in Web Editor NEWUnit testing framework for embedded C code.
Unit testing framework for embedded C code.
A different test runner should be able to compile each suit for the target, upload it, run it and report on the result.
Currently there is only one unit test source for an application source. Update the test runner script to support more that one unit test source. A convention will need to be created for the naming of the unit test sources files, maybe:
app/source/foo.c
test/source/test_foo.c
test/source/test_foo_descriptiveName.c
Both unit test files would be compiled and run with foo.c. Both tests are independent.
There are currently assertion to verify that a parameter is equal to a specific value for all invocations to a mock. (Assert_AllCalls1
. etc)
Add asserts to verify that a parameter is (less than | greater than) to a specific value for all invocations to a mock. For consistency rename Assert_AllCalls1
:
Ex:
Assert_AllCallsEquals1(fn, value);
Assert_AllCallsLessThan1(fn, value);
Assert_AllCallsGreaterThan1(fn, value);
Support for parameter number 1..5 (15 macros in total, 10 new)
Investigate that return sequences from mocks are working correctly. Based on usage in the field this may not be working correctly for the last item of the sequence. Verify that:
int seq[]= {1, 2, 3};
Mock_ReturnSequence(fn, 3, seq);
Results in the following sequence:
fn() -> 1
fn() -> 2
fn() -> 3
fn() -> 3
This is just a "for instance" case, investigate the sequence usage generally.
Allow a test_foo.c file to be run without requiring an application foo.c file. This would allow tests for application headers (macros, etc.). At the moment the tests for headers need to ride along with other tests, even though the header may be used by multiple application files. This makes it hard to find and manage these tests.
Mock_Value assumes the return type is uint32_t.
Clang-tidy hints that using strtoul may be safer than using scanf when reading the number of accrued assertions from the assertions.txt file.
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.