15 #ifndef HEXT_CONTAINS_WORDS_TEST_H_INCLUDED
16 #define HEXT_CONTAINS_WORDS_TEST_H_INCLUDED
45 :
public Cloneable<ContainsWordsTest, ValueTest>
63 bool test(
const char * subject)
const override;
67 std::vector<std::string> words_;
Defines template hext::Cloneable.
Declares hext::ValueTest.
Defines HEXT_PUBLIC and HEXT_PRIVATE.
Curiously recurring template pattern that extends a base class to provide a virtual method Cloneable:...
Tests whether a string contains all given words.
ContainsWordsTest(std::vector< std::string > words) noexcept
Constructs a ContainsWordsTest that succeeds for subjects that contain all words given in a vector.
ContainsWordsTest(std::string words)
Constructs a ContainsWordsTest that succeeds for subjects that contain all words given in a string.
bool test(const char *subject) const override
Returns true if subject contains all given words.