Hi folks, As grilo's code gets more mature and the catalog of supported services grow, having nice test units will make our lives more fun and grilo code more robust. I'm interested in start working on this ASAP. My proposal is: 1) Create a '/tests' folder under root of grilo module. 2) Move the fake metadata from grilo-plugins module to '/tests' on grilo. 3) Write a fake plugin under '/tests'. 4) Incrementally write test units for all relevant API bits, using only the fake objects, all under '/tests'. 5) Create a '/tests/js' folder and copy there _javascript_ implementations for 'Assert' and 'Test' modules [1]. 6) Write _javascript_ test units under '/tests/js'. Notice that I included _javascript_ tests for two main reasons: 1) to help developing gobject introspection support, and 2) to help designing and coding the test units more rapidly. Also, it could serve as a double check together with C API test units. _javascript_ tests will be executed as part of the 'make check' only if gobject-introspection and gjs are present. Unit tests for other languages like Vala could be added in the future as in '/tests/vala', '/tests/python', etc. If valgrind is present in the platform during 'make check', all tests should be 'valgrind'ed (perhaps we should flag this in 'configure'), and make tests fail upon fatal errors (at least one definitely lost block of memory). Opinions? regards, Edu [1] http://wiki.commonjs.org/wiki/Unit_Testing/1.0 |
Attachment:
signature.asc
Description: OpenPGP digital signature