Re: [gdal-dev] Call for discussion: RFC88: Use GoogleTest framework for C/C++ unit tests

2022-11-20 Thread Frank Warmerdam
On Sun, Nov 20, 2022 at 8:21 PM Even Rouault 
wrote:

> Hi Frank,
>
>
> I'm not a huge GoogleTest fan but then I'm also not saying it *worse* than
> any alternative, but the reasons are reasonably convincing, and I'm happy
> if those running and contributing tests are happy!
>
> Just curious what you don't like with GoogleTest ?
>

Even,

There is nothing meaningful to offer.  I've been mildly annoyed by the
dependencies it implied in other projects (ie. PixelLoom), but really this
is not material.  My point was more along the line of "I hate every test
environment / ticket system / language / ...", but that given that I do not
find it worse than most. :-)

Should I understand from the RFC that
> https://github.com/rouault/gdal/tree/gtest implements the migration?
> (ie. we have already done the work to migrate, we just need to agree on it?)
>
> Yes the implementation is ready in https://github.com/OSGeo/gdal/pull/6732
> . I find it more convincing when there's an implementation backing a RFC
> (it was partial when I submitted the RFC and I finished it as the initial
> feedback was positive)
>

Awesome.  While sometimes it is a bit "heavy" to implement an idea before
proposing it, it does make it much easier to adopt knowing the
implementation is waiting in the wings.

Best regards,
Frank

> Even
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>

-- 
---+--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmer...@pobox.com
light and sound - activate the windows | +1 650-701-7823

and watch the world go round - Rush| Geospatial Software Developer
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Call for discussion: RFC88: Use GoogleTest framework for C/C++ unit tests

2022-11-20 Thread Even Rouault

Hi Frank,


I'm not a huge GoogleTest fan but then I'm also not saying it *worse* 
than any alternative, but the reasons are reasonably convincing, and 
I'm happy if those running and contributing tests are happy!

Just curious what you don't like with GoogleTest ?


Should I understand from the RFC that 
https://github.com/rouault/gdal/tree/gtest implements the migration?  
(ie. we have already done the work to migrate, we just need to agree 
on it?)


Yes the implementation is ready in 
https://github.com/OSGeo/gdal/pull/6732 . I find it more convincing when 
there's an implementation backing a RFC (it was partial when I submitted 
the RFC and I finished it as the initial feedback was positive)


Even

--
http://www.spatialys.com
My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Call for discussion: RFC88: Use GoogleTest framework for C/C++ unit tests

2022-11-20 Thread Frank Warmerdam
Even,

I'm not a huge GoogleTest fan but then I'm also not saying it *worse* than
any alternative, but the reasons are reasonably convincing, and I'm happy
if those running and contributing tests are happy!

Should I understand from the RFC that
https://github.com/rouault/gdal/tree/gtest implements the migration?  (ie.
we have already done the work to migrate, we just need to agree on it?)

Best regards,
Frank


On Fri, Nov 18, 2022 at 2:27 PM Javier Jimenez Shaw 
wrote:

> I am not in the PSC, but this RFC sounds very good. Thanks!
>
> Now that the tests are going to change, maybe it is a good idea to apply
> clang-format to them.
> .___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ...  ._ .__
> Entre dos pensamientos racionales
> hay infinitos pensamientos irracionales.
>
>
>
> On Wed, 16 Nov 2022 at 20:28, Kurt Schwehr  wrote:
>
>> I am +1 for this switch, but I'm definitely biased by working at Google.
>> My thoughts:
>>
>> tut definitely gets the job done, but I found it a bit awkward too.  But
>> I think the updates and the additional features of GoogleTest are probably
>> worth it.  I especially like the distinction between ASSERT.* that
>> immediately stops a test when it finds and issue and EXPECT that lets the
>> test move forward until the end of that test so that I can see all of the
>> results of EXPECTS.  The formerly separate "mock" capabilities are really
>> handy too.
>>
>> I wrote a bunch of C++ GDAL tests using GoogleTests in the 2013-207 time
>> frame (Even used a bit of that work as starters to the tests in PROJ, but
>> he went way beyond what I had).  I have a lot of the tests in github, but
>> they are written against very old versions of GDAL.  And, the GoogleTest
>> ability to work with newer versions of C++ has gotten a lot stronger.
>> C++17 wasn't even available when I wrote a lot of the test code.  We have
>> been upgrading GDAL and improving the tests, so if there is interest, I can
>> try to do some updates to the repo.  If any of the autotest2 code is used,
>> the license should be switched from Apache 2.0 to the MIT style license 
>> mentioned
>> here
>> 
>> .
>>
>> https://github.com/schwehr/gdal-autotest2/tree/master/cpp
>>
>> -Kurt
>>
>>
>> On Wed, Nov 16, 2022 at 10:42 AM Even Rouault 
>> wrote:
>>
>>> Hi,
>>>
>>> As this is RFC season. I've prepared RFC88: Use GoogleTest framework for
>>> C/C++ unit tests
>>>
>>> Text at https://github.com/OSGeo/gdal/pull/6720
>>>
>>> Summary:
>>>
>>> The document proposes and describes conversion of the existing C/C++
>>> autotest suite to use the `GoogleTest
>>> framework `__.
>>>
>>> GoogleTest is a popular and maintained framework for C/C++ test
>>> writing, that is a better replacement for the `TUT framework
>>> `__ that we use currently.
>>>
>>> Even
>>>
>>> --
>>> http://www.spatialys.com
>>> My software is free, but my time generally not.
>>>
>>> ___
>>> gdal-dev mailing list
>>> gdal-dev@lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
---+--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmer...@pobox.com
light and sound - activate the windows | +1 650-701-7823
and watch the world go round - Rush| Geospatial Software Developer
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Call for discussion: RFC88: Use GoogleTest framework for C/C++ unit tests

2022-11-18 Thread Javier Jimenez Shaw
I am not in the PSC, but this RFC sounds very good. Thanks!

Now that the tests are going to change, maybe it is a good idea to apply
clang-format to them.
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ...  ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.



On Wed, 16 Nov 2022 at 20:28, Kurt Schwehr  wrote:

> I am +1 for this switch, but I'm definitely biased by working at Google.
> My thoughts:
>
> tut definitely gets the job done, but I found it a bit awkward too.  But I
> think the updates and the additional features of GoogleTest are probably
> worth it.  I especially like the distinction between ASSERT.* that
> immediately stops a test when it finds and issue and EXPECT that lets the
> test move forward until the end of that test so that I can see all of the
> results of EXPECTS.  The formerly separate "mock" capabilities are really
> handy too.
>
> I wrote a bunch of C++ GDAL tests using GoogleTests in the 2013-207 time
> frame (Even used a bit of that work as starters to the tests in PROJ, but
> he went way beyond what I had).  I have a lot of the tests in github, but
> they are written against very old versions of GDAL.  And, the GoogleTest
> ability to work with newer versions of C++ has gotten a lot stronger.
> C++17 wasn't even available when I wrote a lot of the test code.  We have
> been upgrading GDAL and improving the tests, so if there is interest, I can
> try to do some updates to the repo.  If any of the autotest2 code is used,
> the license should be switched from Apache 2.0 to the MIT style license 
> mentioned
> here
> 
> .
>
> https://github.com/schwehr/gdal-autotest2/tree/master/cpp
>
> -Kurt
>
>
> On Wed, Nov 16, 2022 at 10:42 AM Even Rouault 
> wrote:
>
>> Hi,
>>
>> As this is RFC season. I've prepared RFC88: Use GoogleTest framework for
>> C/C++ unit tests
>>
>> Text at https://github.com/OSGeo/gdal/pull/6720
>>
>> Summary:
>>
>> The document proposes and describes conversion of the existing C/C++
>> autotest suite to use the `GoogleTest
>> framework `__.
>>
>> GoogleTest is a popular and maintained framework for C/C++ test
>> writing, that is a better replacement for the `TUT framework
>> `__ that we use currently.
>>
>> Even
>>
>> --
>> http://www.spatialys.com
>> My software is free, but my time generally not.
>>
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Call for discussion: RFC88: Use GoogleTest framework for C/C++ unit tests

2022-11-17 Thread Even Rouault

Hi Mateusz,

TUT was a very sensible choice at the time you implemented it, and it 
has been very useful up to now !


Even

Le 17/11/2022 à 18:02, Mateusz Loskot a écrit :

On Wed, 16 Nov 2022 at 19:42, Even Rouault  wrote:

Text at https://github.com/OSGeo/gdal/pull/6720

The document proposes and describes conversion of the existing C/C++
autotest suite to use the `GoogleTest
framework `__.

GoogleTest is a popular and maintained framework for C/C++ test
writing, that is a better replacement for the `TUT framework
`__ that we use currently.

+1 Mateusz

It was me who 'polluted' GDAL with TUT and here it is why I did it:
It was a very long time ago to support porting GDAL (and GEOS too)
to Windows CE platform which was very limited in terms of C and C++
support. And. we also had to develop some C library routines
https://wcelibcex.sourceforge.net/
And, Python for Windows CE was very limited.
And, it was much easier to debug C/C++ than Python,
So, I decided to start C/C++ counterpart of the autotest suite.
At that time, TUT was small, portable, feature-complete
framework that we incorporated by copying its single header.

Since the C++ autotest is still alive, switching to a modern test
framework is much desired and Google Test is sensible choice.
I see no reason to stay with TUT, which is rather a niche
library nowadays.

Best regards,


--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Call for discussion: RFC88: Use GoogleTest framework for C/C++ unit tests

2022-11-17 Thread Mateusz Loskot
On Wed, 16 Nov 2022 at 19:42, Even Rouault  wrote:
>
> Text at https://github.com/OSGeo/gdal/pull/6720
>
> The document proposes and describes conversion of the existing C/C++
> autotest suite to use the `GoogleTest
> framework `__.
>
> GoogleTest is a popular and maintained framework for C/C++ test
> writing, that is a better replacement for the `TUT framework
> `__ that we use currently.

+1 Mateusz

It was me who 'polluted' GDAL with TUT and here it is why I did it:
It was a very long time ago to support porting GDAL (and GEOS too)
to Windows CE platform which was very limited in terms of C and C++
support. And. we also had to develop some C library routines
https://wcelibcex.sourceforge.net/
And, Python for Windows CE was very limited.
And, it was much easier to debug C/C++ than Python,
So, I decided to start C/C++ counterpart of the autotest suite.
At that time, TUT was small, portable, feature-complete
framework that we incorporated by copying its single header.

Since the C++ autotest is still alive, switching to a modern test
framework is much desired and Google Test is sensible choice.
I see no reason to stay with TUT, which is rather a niche
library nowadays.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Call for discussion: RFC88: Use GoogleTest framework for C/C++ unit tests

2022-11-16 Thread Kurt Schwehr
I am +1 for this switch, but I'm definitely biased by working at Google.
My thoughts:

tut definitely gets the job done, but I found it a bit awkward too.  But I
think the updates and the additional features of GoogleTest are probably
worth it.  I especially like the distinction between ASSERT.* that
immediately stops a test when it finds and issue and EXPECT that lets the
test move forward until the end of that test so that I can see all of the
results of EXPECTS.  The formerly separate "mock" capabilities are really
handy too.

I wrote a bunch of C++ GDAL tests using GoogleTests in the 2013-207 time
frame (Even used a bit of that work as starters to the tests in PROJ, but
he went way beyond what I had).  I have a lot of the tests in github, but
they are written against very old versions of GDAL.  And, the GoogleTest
ability to work with newer versions of C++ has gotten a lot stronger.
C++17 wasn't even available when I wrote a lot of the test code.  We have
been upgrading GDAL and improving the tests, so if there is interest, I can
try to do some updates to the repo.  If any of the autotest2 code is used,
the license should be switched from Apache 2.0 to the MIT style
license mentioned
here

.

https://github.com/schwehr/gdal-autotest2/tree/master/cpp

-Kurt


On Wed, Nov 16, 2022 at 10:42 AM Even Rouault 
wrote:

> Hi,
>
> As this is RFC season. I've prepared RFC88: Use GoogleTest framework for
> C/C++ unit tests
>
> Text at https://github.com/OSGeo/gdal/pull/6720
>
> Summary:
>
> The document proposes and describes conversion of the existing C/C++
> autotest suite to use the `GoogleTest
> framework `__.
>
> GoogleTest is a popular and maintained framework for C/C++ test
> writing, that is a better replacement for the `TUT framework
> `__ that we use currently.
>
> Even
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Call for discussion: RFC88: Use GoogleTest framework for C/C++ unit tests

2022-11-16 Thread Even Rouault

Hi,

As this is RFC season. I've prepared RFC88: Use GoogleTest framework for 
C/C++ unit tests


Text at https://github.com/OSGeo/gdal/pull/6720

Summary:

The document proposes and describes conversion of the existing C/C++
autotest suite to use the `GoogleTest
framework `__.

GoogleTest is a popular and maintained framework for C/C++ test
writing, that is a better replacement for the `TUT framework
`__ that we use currently.

Even

--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev