Sha256: 4dbdde5b5d2d5500201c8a5711ee6fc3c45ec1ec41da34f1689f316b0cbb6cbd

Contents?: true

Size: 834 Bytes

Versions: 2

Compression:

Stored size: 834 Bytes

Contents

#ifndef BANDIT_BELESSTHAN_H
#define BANDIT_BELESSTHAN_H

#include "Matcher.h"

namespace bandit { namespace Matchers {

    template<typename T>
    class BeLessThan : public Matcher
    {
    public:
        explicit BeLessThan(const T& expectedValue) : Matcher(), _expectedValue(expectedValue) {}

        template<typename U>
        bool matches(const U& actualValue) const
	{
	    return actualValue < _expectedValue;
	}

    protected:
        virtual std::string failure_message_end() const
	{
	    std::ostringstream ss;
	    ss << "be less than <" << _expectedValue << ">";
	    return ss.str();
	}

    private:
        const T& _expectedValue;
    };

    template<typename T>
    BeLessThan<T> be_less_than(const T& expectedValue)
    {
        return BeLessThan<T>(expectedValue);
    }
}}

#endif	// BANDIT_BELESSTHAN_H

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tree-sitter-0.1.0 ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeLessThan.h
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeLessThan.h