C++Spec 1.0.0
BDD testing for C++
Loading...
Searching...
No Matches
be_nullptr.hpp
Go to the documentation of this file.
1
2#pragma once
3#include <string>
4
5#include "matcher_base.hpp"
6
7namespace CppSpec::Matchers {
8
9template <class A>
10class BeNullptr : MatcherBase<A, std::nullptr_t> {
11 public:
12 explicit BeNullptr(Expectation<A>& expectation) : MatcherBase<A, std::nullptr_t>(expectation) {}
13
14 std::string verb() override { return "be"; }
15 std::string description() override { return "be nullptr"; }
16 bool match() override { return this->actual() == nullptr; }
17};
18
19} // namespace CppSpec::Matchers
Wraps the target of an expectation.
Definition expectation.hpp:47
std::string description() override
Get the description of the Matcher.
Definition be_nullptr.hpp:15
Contains the base class for all Matchers.