Lumiera  0.pre.03
»edit your freedom«
IterTools_test Class Reference

Description

Test:
build combined and filtering iterators with the help of lib::IterTool.

Check correct behaviour of the resulting iterators and verify they fulfil the Lumiera Forward Iterator concept

Todo:
implement more iterator tools.... see Ticket #347

Definition at line 94 of file itertools-test.cpp.

Private Types

typedef TestSource::iterator Iter
 

Private Member Functions

void buildFilterIterator (Iter const &ii)
 
void buildTransformingIterator (Iter const &ii)
 
void buildWrappedSingleElement ()
 
template<class IT >
void pullOut (IT const &ii)
 
virtual void run (Arg arg)
 
void verify_filterExtension ()
 
void verify_filterRepetitions ()
 
template<class IT >
void verifyComparisons (IT const &ii)
 
void verifyPullLast (Iter const &ii)
 

Static Private Member Functions

static ulong addTwo (int i)
 
static int idFunc (int i)
 
static int negate (int i)
 
static bool takeAll (int)
 
static bool takeEve (int i)
 
static bool takeOdd (int i)
 
static bool takeTrd (int i)
 

Member Function Documentation

◆ verify_filterExtension()

void verify_filterExtension ( )
inlineprivate
Test:
verify the ability to extend a filter condition while in the middle of an ongoing iteration.

Typically this means sharpening the filter condition and thus making the filter more restrictive, filtering away more elements of the source stream. But through the ability to add disjunctive and negated clauses, it is also possible to weaken the filter condition

Note
in case of a weakened filter condition, there is no reset of the source iterator, i.e. we don't re-evaluate from start, but just from current head.

Definition at line 176 of file itertools-test.cpp.

◆ verify_filterRepetitions()

void verify_filterRepetitions ( )
inlineprivate
Test:
verify the helper to filter duplicate elements emitted by an source iterator.

This test creates a sequence of numbers with random repetitions.

Definition at line 244 of file itertools-test.cpp.

◆ buildWrappedSingleElement()

void buildWrappedSingleElement ( )
inlineprivate
Test:
wrap an arbitrary single element as pseudo-iterator

Definition at line 276 of file itertools-test.cpp.

References lib::singleValIterator().

+ Here is the call graph for this function:

◆ verifyComparisons()

void verifyComparisons ( IT const &  ii)
inlineprivate
Test:
verify equality handling and NIL detection for the given iterator/wrapper handed in

Definition at line 350 of file itertools-test.cpp.

+ Inheritance diagram for IterTools_test:
+ Collaboration diagram for IterTools_test:

The documentation for this class was generated from the following file: