[test] Ticket #6624 (Add a BOOST_<level>_NE_COLLECTIONS testing tool)

Hello, I have been unable to reach the current maintainer of Boost.Test regarding Ticket #6624: https://svn.boost.org/trac/boost/ticket/6624 Would someone like to review my patch for this small enhancement and commit it? Daniel Trebbien

It occurred to me that a small demonstration would be helpful. I just attached an archive of such a demonstration to the ticket: https://svn.boost.org/trac/boost/attachment/ticket/6624/ticket6624.tar.bz2 The output (with --log_level=warning) is: Running 5 test cases... test_ticket6624.cpp(48): warning: in "test_same_collections": condition { v1.begin(), v1.end() } != { v2.begin(), v2.end() } is not satisfied. Collections have the same size (3) and contents: 0: 3 1: -1 2: 10 test_ticket6624.cpp(61): error: in "test_same_collections2": check { v1.begin(), v1.end() } != { v2.begin(), v2.end() } failed. Collections have the same size (3) and contents: 0: 3 1: -1 2: 10 test_ticket6624.cpp(62): fatal error: in "test_same_collections2": critical check false failed test_ticket6624.cpp(75): fatal error: in "test_same_collections3": critical check { v1.begin(), v1.end() } != { v2.begin(), v2.end() } failed. Collections have the same size (3) and contents: 0: 3 1: -1 2: 10 *** 3 failures detected in test suite "Ticket #6624 tests" That is the expected output. Daniel Trebbien On 2012-04-01, Daniel Trebbien <dtrebbien@gmail.com> wrote:
Hello,
I have been unable to reach the current maintainer of Boost.Test regarding Ticket #6624: https://svn.boost.org/trac/boost/ticket/6624
Would someone like to review my patch for this small enhancement and commit it?
Daniel Trebbien

Hi Daniel, On Thursday, 5. April 2012 17:08:06 Daniel Trebbien wrote:
It occurred to me that a small demonstration would be helpful. I just attached an archive of such a demonstration to the ticket: https://svn.boost.org/trac/boost/attachment/ticket/6624/ticket6624.tar.bz2
[snip]
That is the expected output.
Could you please add the "demonstration" to the Boost.Test test suite in "libs/test/test" and attach the resulting patch to 6624? An enhancement without a proper unit-test is not viable. And it would be good to have one or more "fail" tests for this logic, too. Just check the test suite for examples.
On 2012-04-01, Daniel Trebbien <dtrebbien@gmail.com> wrote:
Hello,
I have been unable to reach the current maintainer of Boost.Test regarding Ticket #6624: https://svn.boost.org/trac/boost/ticket/6624
Well, Gennadiy is hard to reach. Directly CC: ing him should do the trick.
Would someone like to review my patch for this small enhancement and commit it?
If you add the necessary tests, I can get in this in. If I can get Gennadiys approval, of course. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu !

Jürgen Hunold <jhunold <at> gmx.eu> writes:
If you add the necessary tests, I can get in this in. If I can get Gennadiys approval, of course.
Hi, Sorry for the silence. I was out of town for a bit. Frankly, I would not be keen on adding more tools like this. Latest Boost.Test is moving away from all these NE, GT etc tool variants. Maybe if you can come up with something more generic, which will work for any comparisons you'd like to do with collection elements. Something like: vector<int> a; vector<int> b; BOOST_CHECK( COL(a) > b ); BOOST_CHECK( COL(a) == b ); BOOST_CHECK( COL(a) <= b ); I already implemented non collection tools (see in trunk). Gennadiy

On 2012-04-10, Gennadiy Rozental <rogeeff@gmail.com> wrote:
Jürgen Hunold <jhunold <at> gmx.eu> writes:
If you add the necessary tests, I can get in this in. If I can get Gennadiys approval, of course.
Hi,
Sorry for the silence. I was out of town for a bit.
Frankly, I would not be keen on adding more tools like this. Latest Boost.Test is moving away from all these NE, GT etc tool variants. Maybe if you can come up with something more generic, which will work for any comparisons you'd like to do with collection elements. Something like:
vector<int> a; vector<int> b;
BOOST_CHECK( COL(a) > b ); BOOST_CHECK( COL(a) == b ); BOOST_CHECK( COL(a) <= b );
I already implemented non collection tools (see in trunk).
Gennadiy
Hello Gennadiy, Okay. I will look into the new style of testing tools and work on a patch for that. Would it be alright to also add the BOOST_<level>_NE_COLLECTIONS macro for "legacy" users? A new patch would add support for the new style of testing tools as well as the BOOST_<level>_NE_COLLECTIONS macro. Daniel Trebbien
participants (3)
-
Daniel Trebbien
-
Gennadiy Rozental
-
Jürgen Hunold