mardi 2 août 2016

Parsing Testing Data into C Program

I'm developing a module that will be run on an Embedded ARM chip to run an attitude controller, which is written in C. We have a MATLAB simulation, with a bunch of low-level functions that I'd like to be able to make unit tests for with data generated by the MATLAB program.

Each function is reasonably complex, and I'd like to calculate the error between the Matlab output and the C output for validation purposes. Each function has the same Inputs and Outputs between the two implementations, so they should match (to an allowable tolerance).

Are there any good existing file formats that could be useful? The types of test data would be:

<Test Input 1> <Test Input 2> <Test input 3> <Expected Output 1> <Expected output 2>

Where inputs and outputs are arbitrary single floats, arrays or matrices. I have considered XML because there are some nice parsers, but thats about all i know.

Any suggestions or direction?

Aucun commentaire:

Enregistrer un commentaire