Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi guys,

        Suffering an Android problem around readLine - I thought I'd add a unit
test :-) [ after all the great work done to enable them, thanks !]. It
seems however that adding some CPPUNIT_ASSERT(false) lines to many of
the tests in osl_File.cxx meant they still passed beautifully ;-)

        I dug out a few problems, that might be generally interesting:

        * Cppunit_ gnumakefiles can only handle a single test per file
                + I split up the osl_File one to make it run:

          grep gb_CppunitTest_CppunitTest sal/*.mk

                shows a couple are still doubled up and need splitting.
         Interestingly they seem to compile, but then not run :-)
         perhaps we can fix that in the gnumake-ness some better way ?


        * Named registration is used without registering the name
                + so we do lots of eg.

    CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::readLine, "osl_File" );

                + which adds this test to a named suite that is then
                  never executed :-)

                + ergo we need to add:

    CPPUNIT_REGISTRY_ADD_TO_DEFAULT( "osl_File" );

                + and equivalent all over the shop; unless I lost
                  the plot it's quite possible we're missing out huge
                  swathes of the existing unit tests for this reason :-)

        * Enabling some of the file tests - 'copy' and 'move' shows that
          they don't actually pass under Linux; and I imagine there may
          be worse for other platforms - and perhaps some nice bugs.

        If someone is interested in doing the audit across the code-base for
this sort of thing, to make sure we're not accidentally not running
tests that we could usefully use, that'd be cool.

        Otherwise ping me and I'll add another easy hack :-)

        Thanks,

                Michael.


-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.