MCPcopy Create free account
hub / github.com/FidoProject/Fido / BetweenGenerator

Class BetweenGenerator

tests/catch.h:2347–2363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2345
2346template<typename T>
2347class BetweenGenerator : public IGenerator<T> {
2348public:
2349 BetweenGenerator( T from, T to ) : m_from( from ), m_to( to ){}
2350
2351 virtual T getValue( std::size_t index ) const {
2352 return m_from+static_cast<int>( index );
2353 }
2354
2355 virtual std::size_t size() const {
2356 return static_cast<std::size_t>( 1+m_to-m_from );
2357 }
2358
2359private:
2360
2361 T m_from;
2362 T m_to;
2363};
2364
2365template<typename T>
2366class ValuesGenerator : public IGenerator<T> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected