-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve math test environment and vectors #43
Comments
Would it be within the realm of possibility to use some generator in higher-level language to tackle the tests? I know you wrote you'd prefer not to have it generated by some other program... but honestly, that Also, the csv format, as it stands, doesn't really lend itself to functions that take two vectors ( In any case, would you be open to a simpler test suite in, say, Ruby? One last thing -- I've had a rather nice experience with The question with property-based testing, of course, is how to check the implementation (properties) against reality. Would it make sense to compare against |
The testing environment currently leaves a lot to be desired. Agree 100%! Open to suggestions and contributions. The only thing I would ask is that there is an intermediate text format with some pre determined format that can be fed as an input/output to the function so that folks can bypass the test generation infrastructure. (for example feeding in from matlab and other tools). This has saved me many times in hardware design, but perhaps this is over constraining things for software development? Open to suggestions/feedback.. |
Added reading from CSV file for math tests back here: |
I've been thinking about (and developing in hiding 😃) expansion of current test framework to cover all cases of I/O to functions. There's only one problem I got so far. Test data files are converted to C struct's at compile time by a shell script (within Makefile). This script assumes that all data passed to given function has to be |
@olajep I see you've been rolling out your own test infrastructure. Check really isn't suited for embedded environments. Have you checked out https://github.com/ThrowTheSwitch/Unity? I've used it in past embedded devs and it's really good. It's all pure ANSI C (I've compiled it for ATMEL and MSP430), fairly small (14KB, which granted is more than the 3KB you've been getting), and flexible (it only requires some sort of |
The current test environment is quite primitive. It works with a set of golden vectors in a tabular text format.
Example:
pal/src/math/test/p_log10_f32.dat
Currently some of the functions are missing test vectors, and certainly all functions need more exhaustive testing...open to suggestions with respect to framework. (I am sure there is a lot out there).
I have had great success with plain text based unit testing in the past. (at least as an intermediate format).
The current pal/src/test_main.c is VERY primitive. What I would prefer not having is a personalized test function for each function that is copy pasted or auto generated by some other program (been there done that...) Since all of the functions are quite similar and math oriented, it seems that a common single test framework with input data and expected data is the way to go...
The text was updated successfully, but these errors were encountered: