2009-11-02 06:06:43 +01:00
|
|
|
|
/*
|
|
|
|
|
|
IterTools(Test) - building combined and filtering iterators based on the Iterator tools
|
2010-12-10 02:55:40 +01:00
|
|
|
|
|
Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
* there is no entity "Lumiera.org" which holds any copyrights
* Lumiera source code is provided under the GPL Version 2+
== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''
The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!
The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
|
|
|
|
Copyright (C)
|
2026-03-30 21:24:54 +02:00
|
|
|
|
2009,2026 Hermann Vosseler <Ichthyostega@web.de>
|
2010-12-10 02:55:40 +01:00
|
|
|
|
|
Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
* there is no entity "Lumiera.org" which holds any copyrights
* Lumiera source code is provided under the GPL Version 2+
== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''
The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!
The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
|
|
|
|
**Lumiera** is free software; you can redistribute it and/or modify it
|
|
|
|
|
|
under the terms of the GNU General Public License as published by the
|
|
|
|
|
|
Free Software Foundation; either version 2 of the License, or (at your
|
|
|
|
|
|
option) any later version. See the file COPYING for further details.
|
2010-12-10 02:55:40 +01:00
|
|
|
|
|
Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
* there is no entity "Lumiera.org" which holds any copyrights
* Lumiera source code is provided under the GPL Version 2+
== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''
The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!
The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
|
|
|
|
* *****************************************************************/
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
2017-02-22 01:54:20 +01:00
|
|
|
|
/** @file itertools-test.cpp
|
2017-02-22 03:17:18 +01:00
|
|
|
|
** unit test \ref IterTools_test
|
2016-11-03 18:20:10 +01:00
|
|
|
|
*/
|
|
|
|
|
|
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
2026-03-06 21:34:20 +01:00
|
|
|
|
#include "test/run.hpp"
|
2026-03-30 21:24:54 +02:00
|
|
|
|
#include "lib/itertools.hpp"
|
|
|
|
|
|
#include "test/test-coll.hpp"
|
2026-03-06 21:34:20 +01:00
|
|
|
|
#include "test/test-helper.hpp"
|
2026-03-30 21:24:54 +02:00
|
|
|
|
#include "lib/iter-adapter-stl.hpp"
|
|
|
|
|
|
#include "lib/format-util.hpp"
|
2016-01-07 03:58:29 +01:00
|
|
|
|
#include "lib/util.hpp"
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
using test::Test;
|
|
|
|
|
|
using util::isnil;
|
|
|
|
|
|
using util::join;
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
using std::vector;
|
|
|
|
|
|
using test::VecI;
|
|
|
|
|
|
using test::getTestSeq_int;
|
|
|
|
|
|
using test::showType;
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
|
|
|
|
|
namespace lib {
|
|
|
|
|
|
namespace test{
|
|
|
|
|
|
|
2024-03-16 02:04:47 +01:00
|
|
|
|
using LERR_(ITER_EXHAUST);
|
2012-04-24 06:00:55 +02:00
|
|
|
|
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
namespace { // a test iterator
|
2010-12-17 22:51:27 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
const uint NUM_ELMS{10};
|
|
|
|
|
|
const auto TEST_NUMZ = getTestSeq_int<VecI> (NUM_ELMS);
|
|
|
|
|
|
|
|
|
|
|
|
inline auto
|
|
|
|
|
|
iterNum()
|
2009-11-02 06:06:43 +01:00
|
|
|
|
{
|
2026-03-30 21:24:54 +02:00
|
|
|
|
return RangeIter{TEST_NUMZ.begin(), TEST_NUMZ.end()};
|
|
|
|
|
|
}
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
|
|
|
|
|
} // (END) Test data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-24 23:06:36 +02:00
|
|
|
|
/***************************************************************************//**
|
2026-03-30 21:24:54 +02:00
|
|
|
|
* @test build simple filter and transforming iterators using the »itertools«.
|
2010-12-10 02:55:40 +01:00
|
|
|
|
* Check correct behaviour of the resulting iterators and
|
2026-03-30 21:24:54 +02:00
|
|
|
|
* verify they behave like a **Lumiera Forward Iterator**.
|
2009-11-02 06:06:43 +01:00
|
|
|
|
*/
|
|
|
|
|
|
class IterTools_test : public Test
|
|
|
|
|
|
{
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
using Iter = decltype(iterNum());
|
2024-11-15 19:02:48 +01:00
|
|
|
|
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
|
|
|
|
|
virtual void
|
2026-03-30 21:24:54 +02:00
|
|
|
|
run (Arg)
|
2009-11-02 06:06:43 +01:00
|
|
|
|
{
|
2026-03-30 21:24:54 +02:00
|
|
|
|
verify_testSetup();
|
|
|
|
|
|
|
|
|
|
|
|
verify_singleIter();
|
|
|
|
|
|
verify_filterIter();
|
|
|
|
|
|
verify_filterRepeat();
|
|
|
|
|
|
verify_transformIter();
|
|
|
|
|
|
verify_pullLast();
|
2009-11-02 06:06:43 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
/** @test fundamental iterator behaviour. */
|
2009-11-02 06:06:43 +01:00
|
|
|
|
void
|
2026-03-30 21:24:54 +02:00
|
|
|
|
verify_testSetup()
|
2009-11-02 06:06:43 +01:00
|
|
|
|
{
|
2026-03-30 21:24:54 +02:00
|
|
|
|
Iter ii = iterNum();
|
|
|
|
|
|
|
|
|
|
|
|
CHECK (ii);
|
|
|
|
|
|
CHECK (not isnil(ii));
|
|
|
|
|
|
CHECK (0 == *ii);
|
|
|
|
|
|
++++ii;
|
|
|
|
|
|
CHECK (2 == *ii);
|
|
|
|
|
|
|
|
|
|
|
|
verifyComparisons(ii);
|
|
|
|
|
|
CHECK (join (ii) == "2, 3, 4, 5, 6, 7, 8, 9"_expect );
|
|
|
|
|
|
CHECK (join (ii, "-") == "2-3-4-5-6-7-8-9"_expect );
|
|
|
|
|
|
CHECK (ii);
|
|
|
|
|
|
CHECK (2 == *ii);
|
|
|
|
|
|
|
|
|
|
|
|
while (ii)
|
|
|
|
|
|
++ii;
|
|
|
|
|
|
CHECK (not ii);
|
|
|
|
|
|
VERIFY_ERROR (ITER_EXHAUST, *ii );
|
|
|
|
|
|
VERIFY_ERROR (ITER_EXHAUST, ++ii);
|
2009-11-02 06:06:43 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
/** @test verify equality handling and NIL detection
|
|
|
|
|
|
* for the given iterator/wrapper handed in */
|
|
|
|
|
|
template<class IT>
|
2015-12-05 00:52:45 +01:00
|
|
|
|
void
|
2026-03-30 21:24:54 +02:00
|
|
|
|
verifyComparisons (IT const& ii)
|
2015-12-05 00:52:45 +01:00
|
|
|
|
{
|
2026-03-30 21:24:54 +02:00
|
|
|
|
IT i1(ii);
|
|
|
|
|
|
IT i2(ii);
|
|
|
|
|
|
IT iN;
|
|
|
|
|
|
CHECK ( isnil (iN));
|
|
|
|
|
|
CHECK (!isnil (i1));
|
|
|
|
|
|
CHECK (!isnil (i2));
|
2015-12-05 02:00:44 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
CHECK (i1 == i2); CHECK (i2 == i1);
|
|
|
|
|
|
CHECK (i1 != iN); CHECK (iN != i1);
|
|
|
|
|
|
CHECK (i2 != iN); CHECK (iN != i2);
|
2010-01-06 06:19:30 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
++i1;
|
|
|
|
|
|
CHECK (i1 != i2);
|
|
|
|
|
|
CHECK (i1 != iN);
|
2010-01-06 06:19:30 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
++i2;
|
|
|
|
|
|
CHECK (i1 == i2);
|
|
|
|
|
|
CHECK (i1 != iN);
|
|
|
|
|
|
CHECK (i2 != iN);
|
2010-01-06 06:19:30 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
while (++i1) { }
|
|
|
|
|
|
CHECK (isnil(i1));
|
|
|
|
|
|
CHECK (i1 != i2);
|
|
|
|
|
|
CHECK (i1 == iN);
|
2010-01-06 06:19:30 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
while (++i2) { }
|
|
|
|
|
|
CHECK (isnil(i2));
|
|
|
|
|
|
CHECK (i2 == i1);
|
|
|
|
|
|
CHECK (i2 == iN);
|
2010-01-06 06:19:30 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-29 14:51:51 +01:00
|
|
|
|
/** @test wrap an arbitrary single element as pseudo-iterator */
|
|
|
|
|
|
void
|
2026-03-30 21:24:54 +02:00
|
|
|
|
verify_singleIter()
|
2017-10-29 14:51:51 +01:00
|
|
|
|
{
|
|
|
|
|
|
uint i{12};
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
auto i1 = singletonIter (12);
|
|
|
|
|
|
auto i2 = singletonIter ( i);
|
|
|
|
|
|
auto i3 = singletonIter (&i);
|
2017-10-29 14:51:51 +01:00
|
|
|
|
|
|
|
|
|
|
CHECK (not isnil(i1));
|
|
|
|
|
|
CHECK (not isnil(i2));
|
|
|
|
|
|
CHECK (not isnil(i3));
|
|
|
|
|
|
CHECK (12 == *i1);
|
|
|
|
|
|
CHECK (12 == *i2);
|
|
|
|
|
|
CHECK (12 == **i3);
|
|
|
|
|
|
|
|
|
|
|
|
i = 23;
|
|
|
|
|
|
CHECK (12 == *i1);
|
|
|
|
|
|
CHECK (23 == *i2);
|
|
|
|
|
|
CHECK (23 == **i3);
|
|
|
|
|
|
|
|
|
|
|
|
++i1;
|
|
|
|
|
|
++i2;
|
|
|
|
|
|
++i3;
|
|
|
|
|
|
CHECK (isnil(i1));
|
|
|
|
|
|
CHECK (isnil(i2));
|
|
|
|
|
|
CHECK (isnil(i3));
|
|
|
|
|
|
VERIFY_ERROR (ITER_EXHAUST, *i1 );
|
|
|
|
|
|
VERIFY_ERROR (ITER_EXHAUST, *i2 );
|
|
|
|
|
|
VERIFY_ERROR (ITER_EXHAUST, *i3 );
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
// assignable as any iterator...
|
|
|
|
|
|
auto i0 = nilIter<int>();
|
|
|
|
|
|
i0 = singletonIter (13);
|
|
|
|
|
|
CHECK (13 == *i0);
|
|
|
|
|
|
CHECK (isnil (i1));
|
|
|
|
|
|
std::swap (i0,i1);
|
|
|
|
|
|
CHECK (isnil (i0));
|
2017-10-29 14:51:51 +01:00
|
|
|
|
CHECK (13 == *i1);
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
i1 = iter::Single<int>{};
|
2017-10-29 14:51:51 +01:00
|
|
|
|
CHECK (isnil(i1));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
static bool takeAll (int) { return true; }
|
|
|
|
|
|
static bool takeOdd (int i) { return 0 != i % 2; }
|
|
|
|
|
|
static bool takeEve (int i) { return 0 == i % 2; }
|
|
|
|
|
|
static bool takeTrd (int i) { return 0 == i % 3; }
|
2017-10-29 14:51:51 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
/** @test build a filter pipeline based on a predicate */
|
2009-11-13 03:26:20 +01:00
|
|
|
|
void
|
2026-03-30 21:24:54 +02:00
|
|
|
|
verify_filterIter()
|
2009-11-13 03:26:20 +01:00
|
|
|
|
{
|
2026-03-30 21:24:54 +02:00
|
|
|
|
Iter ii = iterNum();
|
2009-11-13 03:26:20 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
CHECK (join (filterIter (ii, takeAll)) == "0, 1, 2, 3, 4, 5, 6, 7, 8, 9"_expect );
|
|
|
|
|
|
CHECK (join (filterIter (ii, takeEve)) == "0, 2, 4, 6, 8"_expect );
|
|
|
|
|
|
CHECK (join (filterIter (ii, takeOdd)) == "1, 3, 5, 7, 9"_expect );
|
2009-11-13 03:26:20 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
auto all = filterIter (ii, takeAll);
|
|
|
|
|
|
auto odd = filterIter (ii, takeOdd);
|
|
|
|
|
|
verifyComparisons (all);
|
|
|
|
|
|
verifyComparisons (odd);
|
2009-11-13 03:26:20 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
while (++all and ++odd)
|
|
|
|
|
|
CHECK (all != odd);
|
|
|
|
|
|
|
|
|
|
|
|
while (++all) { }
|
|
|
|
|
|
CHECK (isnil (odd));
|
|
|
|
|
|
CHECK (all == odd);
|
2009-11-13 03:26:20 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
/** @test verify the helper to filter duplicate elements
|
|
|
|
|
|
* emitted by an source iterator. This test creates
|
|
|
|
|
|
* a sequence of numbers with random repetitions.
|
|
|
|
|
|
*/
|
|
|
|
|
|
void
|
|
|
|
|
|
verify_filterRepeat()
|
|
|
|
|
|
{
|
|
|
|
|
|
vector<uint> numberz;
|
|
|
|
|
|
for (uint i=0; i<NUM_ELMS; ++i)
|
|
|
|
|
|
{
|
|
|
|
|
|
uint n = 1 + rani (100);
|
|
|
|
|
|
do numberz.push_back(i);
|
|
|
|
|
|
while (--n);
|
|
|
|
|
|
}
|
|
|
|
|
|
CHECK (NUM_ELMS < numberz.size(), "no repetition in test data??");
|
|
|
|
|
|
|
|
|
|
|
|
auto completeSequence = iter_stl::eachElm (numberz);
|
|
|
|
|
|
auto filtered = filterRepeat (completeSequence);
|
|
|
|
|
|
|
|
|
|
|
|
uint num=0;
|
|
|
|
|
|
for (; num < NUM_ELMS and not isnil(filtered);
|
|
|
|
|
|
++num,
|
|
|
|
|
|
++filtered
|
|
|
|
|
|
)
|
|
|
|
|
|
CHECK (num == *filtered);
|
|
|
|
|
|
|
|
|
|
|
|
CHECK (num == NUM_ELMS and isnil(filtered));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2009-11-13 03:26:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
static uint addTwo (int i) { return i+2; }
|
|
|
|
|
|
static int negate (int i) { return -i; }
|
|
|
|
|
|
static int idFunc (int i) { return i; }
|
2009-11-13 03:26:20 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
/** @test build a pipeline that maps a function onto the iterator results */
|
2009-11-02 06:06:43 +01:00
|
|
|
|
void
|
2026-03-30 21:24:54 +02:00
|
|
|
|
verify_transformIter()
|
2009-11-02 06:06:43 +01:00
|
|
|
|
{
|
2026-03-30 21:24:54 +02:00
|
|
|
|
Iter ii = iterNum();
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
CHECK (join (transformIter (ii, idFunc)) == "0, 1, 2, 3, 4, 5, 6, 7, 8, 9"_expect );
|
|
|
|
|
|
CHECK (join (transformIter (ii, negate)) == "0, -1, -2, -3, -4, -5, -6, -7, -8, -9"_expect );
|
|
|
|
|
|
CHECK (join (transformIter (ii, addTwo)) == "2, 3, 4, 5, 6, 7, 8, 9, 10, 11"_expect );
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
// note: output type changed to unsigned
|
|
|
|
|
|
using TransIT = decltype(transformIter (ii, addTwo));
|
|
|
|
|
|
CHECK (showType<TransIT::value_type>() == "uint"_expect);
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
auto idi = transformIter (ii, idFunc);
|
|
|
|
|
|
auto neg = transformIter (ii, negate);
|
|
|
|
|
|
verifyComparisons (idi);
|
|
|
|
|
|
verifyComparisons (neg);
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
CHECK (idi == neg); // Note twist: same type, different functor, yet same result (≡0)
|
|
|
|
|
|
CHECK (++idi);
|
|
|
|
|
|
CHECK (++neg);
|
|
|
|
|
|
for ( ; idi and neg;
|
|
|
|
|
|
++idi,
|
|
|
|
|
|
++neg)
|
|
|
|
|
|
{
|
|
|
|
|
|
CHECK ( idi != neg);
|
|
|
|
|
|
CHECK (*idi != *neg);
|
|
|
|
|
|
}
|
2009-11-02 06:06:43 +01:00
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
CHECK (!idi and !neg);
|
|
|
|
|
|
CHECK (idi == neg);
|
2009-11-02 06:06:43 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-30 21:24:54 +02:00
|
|
|
|
|
|
|
|
|
|
/** @test helper to pull an iterator until its last element */
|
2012-04-24 06:00:55 +02:00
|
|
|
|
void
|
2026-03-30 21:24:54 +02:00
|
|
|
|
verify_pullLast()
|
2012-04-24 06:00:55 +02:00
|
|
|
|
{
|
2026-03-30 21:24:54 +02:00
|
|
|
|
Iter ii = iterNum();
|
2012-04-24 06:00:55 +02:00
|
|
|
|
Iter::value_type lastElm = pull_last (ii);
|
2026-03-30 21:24:54 +02:00
|
|
|
|
CHECK (NUM_ELMS-1 == lastElm);
|
2012-04-24 06:00:55 +02:00
|
|
|
|
|
|
|
|
|
|
Iter emptyIterator;
|
|
|
|
|
|
CHECK (isnil (emptyIterator));
|
|
|
|
|
|
|
|
|
|
|
|
VERIFY_ERROR (ITER_EXHAUST, pull_last(emptyIterator) );
|
|
|
|
|
|
}
|
2009-11-02 06:06:43 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
LAUNCHER (IterTools_test, "unit common");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}} // namespace lib::test
|