MCPcopy Create free account
hub / github.com/apache/thrift / BetweenGenerator

Class BetweenGenerator

compiler/cpp/tests/catch/catch.hpp:2481–2497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2479
2480template<typename T>
2481class BetweenGenerator : public IGenerator<T> {
2482public:
2483 BetweenGenerator( T from, T to ) : m_from( from ), m_to( to ){}
2484
2485 virtual T getValue( std::size_t index ) const {
2486 return m_from+static_cast<int>( index );
2487 }
2488
2489 virtual std::size_t size() const {
2490 return static_cast<std::size_t>( 1+m_to-m_from );
2491 }
2492
2493private:
2494
2495 T m_from;
2496 T m_to;
2497};
2498
2499template<typename T>
2500class ValuesGenerator : public IGenerator<T> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected