|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Aleph::Generator<T> (ah-generator.H). More...
#include <memory>#include <stdexcept>#include <string>#include <type_traits>#include <utility>#include <vector>#include <gtest/gtest.h>#include <ah-generator.H>Go to the source code of this file.
Functions | |
| TEST (Generator, BasicYieldAndRangeFor) | |
| TEST (Generator, IterationOrderIsDescending) | |
| TEST (Generator, EmptyGeneratorYieldsNothing) | |
| TEST (Generator, MixedValueCategoriesPreserveContent) | |
| TEST (Generator, PartialConsumptionStopsEarly) | |
| TEST (Generator, ManualIteratorProtocol) | |
| TEST (Generator, ResumingAfterExhaustionIsSafe) | |
| TEST (Generator, DefaultConstructedGeneratorIsAnEmptyRange) | |
| TEST (Generator, MovedFromGeneratorIsAnEmptyRange) | |
| TEST (Generator, ExceptionPropagatesFromResume) | |
| TEST (Generator, ExceptionMessageIsPreserved) | |
| TEST (Generator, ElementLifetimesAreBalancedAcrossSuspension) | |
| TEST (Generator, ElementLifetimesAreBalancedOnEarlyDestruction) | |
| TEST (Generator, MoveOnlyElementsAreSupported) | |
| TEST (Generator, GeneratorItselfIsMoveOnly) | |
| TEST (Generator, CompositionForwardsThroughNestedFrame) | |
| TEST (Generator, MultipleIndependentInstancesDoNotInterfere) | |
Tests for Aleph::Generator<T> (ah-generator.H).
Covers basic yielding and range-for iteration, lvalue/rvalue/temporary yield lifetime, partial consumption (early break / early destruction), exception propagation, move-only element types, move semantics of the generator itself, an empty (never-yields) generator, and a generator that yields another generator's output (composition).
Definition in file ah_generator_test.cc.
| TEST | ( | Generator | , |
| BasicYieldAndRangeFor | |||
| ) |
Definition at line 128 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| CompositionForwardsThroughNestedFrame | |||
| ) |
Definition at line 321 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| DefaultConstructedGeneratorIsAnEmptyRange | |||
| ) |
Definition at line 219 of file ah_generator_test.cc.
References Aleph::Generator< T >::begin(), and Aleph::Generator< T >::end().
| TEST | ( | Generator | , |
| ElementLifetimesAreBalancedAcrossSuspension | |||
| ) |
Definition at line 270 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| ElementLifetimesAreBalancedOnEarlyDestruction | |||
| ) |
Definition at line 286 of file ah_generator_test.cc.
References Aleph::Generator< T >::begin().
| TEST | ( | Generator | , |
| EmptyGeneratorYieldsNothing | |||
| ) |
Definition at line 149 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| ExceptionMessageIsPreserved | |||
| ) |
Definition at line 256 of file ah_generator_test.cc.
References FAIL.
| TEST | ( | Generator | , |
| ExceptionPropagatesFromResume | |||
| ) |
Definition at line 244 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| GeneratorItselfIsMoveOnly | |||
| ) |
Definition at line 308 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| IterationOrderIsDescending | |||
| ) |
Definition at line 141 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| ManualIteratorProtocol | |||
| ) |
Definition at line 180 of file ah_generator_test.cc.
References Aleph::Generator< T >::begin(), and Aleph::Generator< T >::end().
| TEST | ( | Generator | , |
| MixedValueCategoriesPreserveContent | |||
| ) |
Definition at line 157 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| MovedFromGeneratorIsAnEmptyRange | |||
| ) |
Definition at line 235 of file ah_generator_test.cc.
References Aleph::Generator< T >::begin(), and Aleph::Generator< T >::end().
| TEST | ( | Generator | , |
| MoveOnlyElementsAreSupported | |||
| ) |
Definition at line 300 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| MultipleIndependentInstancesDoNotInterfere | |||
| ) |
Definition at line 329 of file ah_generator_test.cc.
References Aleph::Generator< T >::begin().
| TEST | ( | Generator | , |
| PartialConsumptionStopsEarly | |||
| ) |
Definition at line 165 of file ah_generator_test.cc.
| TEST | ( | Generator | , |
| ResumingAfterExhaustionIsSafe | |||
| ) |
Definition at line 196 of file ah_generator_test.cc.
References Aleph::Generator< T >::begin(), and Aleph::Generator< T >::end().