Re: [PUSHED] add basegfx::fround to unittest (was: basegfx::fround and friends seems needed in windows build)
Hello Michael, On Tue, Feb 21, 2012 at 22:28, Michael Meeks wrote: > Drat, I just did that for you :-) Thanks for this :) Best Regards, -- Korrawit Pruegsanusak ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PUSHED] add basegfx::fround to unittest (was: basegfx::fround and friends seems needed in windows build)
On Tue, 2012-02-21 at 21:24 +0700, Korrawit Pruegsanusak wrote: > Now I attach a patch for reviewing. Lovely - pushed it :-) > OK, I have to confess that I've shamelessly copy-n'-pasted the whole > things from the adjacent ones, and made some modifications on top of > it. There is a certain amount of copy/paste that is sadly necessary to use cppunit - some of it is hidden by macros at least - I dropped all the empty setup/teardown methods in there in a subsequent commit though. > If it's ok, I could push it to master. Drat, I just did that for you :-) Thanks again, Michael. -- michael.me...@suse.com <><, Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PATCH] add basegfx::fround to unittest (was: basegfx::fround and friends seems needed in windows build)
Hello Michael, Stephan, all, First, sorry for my late reply. I've been busy last week. :( On Mon, Feb 13, 2012 at 18:24, Michael Meeks wrote: > I suggest we add a method to test/basegfx2d.cxx that has an equivalent: Thanks for your suggestion :) Now I attach a patch for reviewing. OK, I have to confess that I've shamelessly copy-n'-pasted the whole things from the adjacent ones, and made some modifications on top of it. >From reading the b2drange.hxx, I think this method is to round the values of the range from double to integer. So I just check a simple value rounding. The `cd basegfx && make check` (as Stephan pointed) works fine. And if I change the integer value from (1,2,4,5) to (1,2,4,4), the test failed. If it's ok, I could push it to master. But if I've done something wrong, please feel free to correct me. :) Best Regards, -- Korrawit Pruegsanusak add-fround-to-unit-test.patch Description: Binary data ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
Hi there, On Sun, 2012-02-12 at 12:45 +0700, Korrawit Pruegsanusak wrote: > >> > So there are some alternatives options to hide something from > >> > callcatcher. [...] write unit tests that call it [...] > > Could you please give me a hint how to do this? Thanks :-) Sure ! :-) so we want to keep: +BASEGFX_DLLPUBLIC B2IRange fround(const B2DRange& rRange); around [sic.] ;-) The basegfx/CppunitTest makefile points to the code that is used for unit testing. I suggest we add a method to test/basegfx2d.cxx that has an equivalent: CPPUNIT_TEST(rotate); that does some trivial operation on that method, and checks the results :-) that will ensure the method is called at least from somewhere & calm down the unusedcode checker [ we can remove it from the list then ]. Does that make sense ? Thanks ! :-) Michael. -- michael.me...@suse.com <><, Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On 02/12/2012 06:45 AM, Korrawit Pruegsanusak wrote: On Thu, Feb 9, 2012 at 17:39, Michael Meeks wrote: On Wed, 2012-02-08 at 21:36 +0100, Stephan Bergmann wrote: On 02/08/2012 09:30 PM, Caolán McNamara wrote: So there are some alternatives options to hide something from callcatcher. [...] write unit tests that call it [...] I somehow like that solution best. :) Ditto :-) Could you please give me a hint how to do this? Thanks :-) Module basegfx already has some unit tests in basegfx/test/, run via basegfx/CppunitTest_basegfx.mk (cd basegfx && make check). Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
Hello Michael, all, On Thu, Feb 9, 2012 at 17:39, Michael Meeks wrote: > On Wed, 2012-02-08 at 21:36 +0100, Stephan Bergmann wrote: >> On 02/08/2012 09:30 PM, Caolán McNamara wrote: >> > So there are some alternatives options to hide something from >> > callcatcher. [...] write unit tests that call it [...] >> >> I somehow like that solution best. :) > > Ditto :-) Could you please give me a hint how to do this? Thanks :-) Best Regards, -- Korrawit Pruegsanusak ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On Wed, 2012-02-08 at 21:36 +0100, Stephan Bergmann wrote: > On 02/08/2012 09:30 PM, Caolán McNamara wrote: > > So there are some alternatives options to hide something from > > callcatcher. [...] write unit tests that call it [...] > > I somehow like that solution best. :) Ditto :-) Michael. -- michael.me...@suse.com <><, Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On 02/08/2012 09:30 PM, Caolán McNamara wrote: So there are some alternatives options to hide something from callcatcher. [...] write unit tests that call it [...] I somehow like that solution best. :) Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On Wed, 2012-02-08 at 20:33 +0100, Stephan Bergmann wrote: > I guess one can argue both ways here. A feature-complete basegfx > library where some features happen to only be used in certain scenarios, > but the library itself clean of scenario-differentiating ifdef hacks vs. > "micro-level configuration management." If an inline is unused it doesn't appear, seeing as gcc doesn't generate code for unused inlines. And if something is only used by a cppunit test then it doesn't appear either seeing as calls to the code are generated ;-) So there are some alternatives options to hide something from callcatcher. Remove it, ifdef it out, convert it to an inline, write unit tests that call it, add it to the sed line that differentiates unusedcode.all from unusedcode.easy C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On 02/08/2012 06:31 PM, Michael Meeks wrote: And of course, it'd be good to add some #ifndef UNX stuff around that I suppose, so it is not compiled and doesn't re-appear on the unusedcode.easy list in future :-) I guess one can argue both ways here. A feature-complete basegfx library where some features happen to only be used in certain scenarios, but the library itself clean of scenario-differentiating ifdef hacks vs. "micro-level configuration management." (Though the latter has the benefit of better suiting the unusedcode tool, of course.) Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On Wed, 2012-02-08 at 21:22 +0700, Korrawit Pruegsanusak wrote: > On Wed, Feb 8, 2012 at 17:11, Stephan Bergmann wrote: > > Yes, please just revert what is used by Windows-only canvas/source/directx > > but got erroneously removed. > > Thanks! Done at > http://cgit.freedesktop.org/libreoffice/core/commit/?id=a330f38093e2643a26239557050561afae9ff23d And of course, it'd be good to add some #ifndef UNX stuff around that I suppose, so it is not compiled and doesn't re-appear on the unusedcode.easy list in future :-) Thanks ! Michael. -- michael.me...@suse.com <><, Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
Hello Stephan, On Wed, Feb 8, 2012 at 17:11, Stephan Bergmann wrote: > Yes, please just revert what is used by Windows-only canvas/source/directx > but got erroneously removed. Thanks! Done at http://cgit.freedesktop.org/libreoffice/core/commit/?id=a330f38093e2643a26239557050561afae9ff23d Anyway, I don't have a directx sdk to test it, so I just revert only errors mentioned in tinderbox. Let's see if we need more ... :-) Best Regards, -- Korrawit Pruegsanusak ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On 02/08/2012 10:30 AM, Korrawit Pruegsanusak wrote: What should we do next? (partially) revert it? or ...? :-) Yes, please just revert what is used by Windows-only canvas/source/directx but got erroneously removed. Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
basegfx::fround and friends seems needed in windows build
Hello Alexander, Caolán, all, Regarding recent voreppe tinderbox failure [1], it seems that at least 2 methods are needed: * basegfx::unotools::UnoPolyPolygon::getPolyPolygonUnsafe() const * basegfx::fround -- I'm not sure whether we need all 3 overloaded methods which I found that they've been deleted as part of unusedcode.easy clean-up commit [2]. What should we do next? (partially) revert it? or ...? :-) [1] http://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&brief-log=1328681401.30516#err592 [2] http://cgit.freedesktop.org/libreoffice/core/commit/?id=b3c3e116ff0eb9b550b73d3901395c042e31d192 Best Regards, -- Korrawit Pruegsanusak ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice