Function RangeGenerator

Summary

#include <include/internal/catch_generators_specific.hpp>

(1) RangeGenerator(T const &start, T const &end, T const &step)

(2) RangeGenerator(T const &start, T const &end)

Function overload

Synopsis

#include <include/internal/catch_generators_specific.hpp>

RangeGenerator(T const &start, T const &end, T const &step)

Description

No description yet.

Source

Lines 93-102 in include/internal/catch_generators_specific.hpp.

RangeGenerator(T const& start, T const& end, T const& step):
    m_current(start),
    m_end(end),
    m_step(step),
    m_positive(m_step > T(0))
{
    assert(m_current != m_end && "Range start and end cannot be equal");
    assert(m_step != T(0) && "Step size cannot be zero");
    assert(((m_positive && m_current <= m_end) || (!m_positive && m_current >= m_end)) && "Step moves away from end");
}

Synopsis

#include <include/internal/catch_generators_specific.hpp>

RangeGenerator(T const &start, T const &end)

Description

No description yet.

Source

Lines 104-106 in include/internal/catch_generators_specific.hpp.

RangeGenerator(T const& start, T const& end):
    RangeGenerator(start, end, (start < end) ? T(1) : T(-1))
{}





Add Discussion as Guest

Log in