Sha256: 97f63a3d3dae942ab10ca96f5db15f8d28298ae5de72ad09e4f2f4880f242003

Contents?: true

Size: 692 Bytes

Versions: 2

Compression:

Stored size: 692 Bytes

Contents

#ifndef BANDIT_BEFALSY_H
#define BANDIT_BEFALSY_H

#include "Matcher.h"

namespace bandit { namespace Matchers {

    class BeFalsy : public Matcher
    {
    private:
        // BeFalsy& operator=(const BeFalsy&);

    public:
        explicit BeFalsy() : Matcher() {}
        // ~BeFalsy() {}

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

        bool matches(const std::nullptr_t&) const
	{
	    return true;
	}


    protected:
        virtual std::string failure_message_end() const
	{
	    return std::string("evaluate to false");
	}
    };

    static const BeFalsy be_falsy = BeFalsy();
}}

#endif	// BANDIT_BEFALSY_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/BeFalsy.h
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeFalsy.h