In addition, I think it would be very nice to test hole executables to see if
they produce the intended output, i.e. compare with some reference solution. As
far as I understand (please correct me if mistaken) this is not a feature of
CTest. I know that you can use 'add_test (...)' to see if the executable runs,
but this will not check if the results are correct.
In my opinion this is perfectly doable with ctest, at least if the tests are
created with add_test( ) and some extra commandline arguments. I see the two
alternatives:
1. Create a test executable which essentially contains the full
executable (i.e. the main() { ... } should be veeeery short), and then in the
same scope special code which can check the results against commandline input.
PseudoCode:
int main(int argc , char ** argv) {
Simulator sim;
Sim.run();
/* Compare sim.state with comparison values from argv[] and
call exit(0) if all OK, er exit(1) if it does not match up. */
}
2. Alternatively you can create a small test-runner (e.g. a script in
your favorite scripting language) which will run the executable you are
interested in, and then subsequently compare with a 'true' value entered on the
cmmandline and again exit with exit(0) or exit(1).
Joakim
_______________________________________________
Opm mailing list
[email protected]<mailto:[email protected]>
http://www.opm-project.org/mailman/listinfo/opm
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you
_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm