Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AllTrue, AnyTrue, NoneTrue matchers
- Loading branch information
Showing
22 changed files
with
3,142 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
// Copyright Catch2 Authors | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE_1_0.txt or copy at | ||
// https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
// SPDX-License-Identifier: BSL-1.0 | ||
#include <catch2/matchers/catch_matchers_quantifiers.hpp> | ||
|
||
namespace Catch { | ||
namespace Matchers { | ||
std::string AllTrueMatcher::describe() const { return "contains only true"; } | ||
|
||
AllTrueMatcher AllTrue() { return AllTrueMatcher{}; } | ||
|
||
std::string NoneTrueMatcher::describe() const { return "contains no true"; } | ||
|
||
NoneTrueMatcher NoneTrue() { return NoneTrueMatcher{}; } | ||
|
||
std::string AnyTrueMatcher::describe() const { return "contains at least one true"; } | ||
|
||
AnyTrueMatcher AnyTrue() { return AnyTrueMatcher{}; } | ||
} // namespace Matchers | ||
} // namespace Catch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.