Closed donatodambrosio closed 8 years ago
It would be great, but the following is the reason I think is unfeasible at the state of the library.
1) Example deals with input and output independently. How can a testing suite ensure that the same test (a.k.a. example) taken from two different version of the library really load and output the same stuff? Moreover the code is already duplicated, for instance sciara-fv2 is present in at least serial and omp version.
My proposed solution is to model (as much as possible) the libary s.t. it will be possible to run the same code on different version of the library. This way would allow to remove code duplication in examples, even in tests and will improve overall design of the library making it more abstract (I know that this will require a considerable effort in design and programmin).
Moreover I'm still convinced that examples and tests should be separated because tests are meant not to be taken as example for the users.
In your opinion Is this something that could work (at least in the long run)?
Davede, if possible, change the test suit so that tests are get directly from the existing examples. You can take just the examples' executable. In this manner, we can avoid code duplication. Note that test suite is inconsistent right now, since we (me and Alessio) were forced to modify some examples. Please, Davide, help us!!!