*/
class ITextBlockMatcher
{
- public:
- virtual ~ITextBlockMatcher();
-
- /*! \brief
- * Matches contents of a stream against reference data.
- *
- * \param stream Stream to match.
- * \param checker Checker to use for matching.
- *
- * The method can change the state of the provided checker (e.g., by
- * changing the default tolerance).
- * The caller is responsible of providing a checker where such state
- * changes do not matter.
- */
- virtual void checkStream(TextInputStream *stream,
- TestReferenceChecker *checker) = 0;
+public:
+ virtual ~ITextBlockMatcher();
+
+ /*! \brief
+ * Matches contents of a stream against reference data.
+ *
+ * \param stream Stream to match.
+ * \param checker Checker to use for matching.
+ *
+ * The method can change the state of the provided checker (e.g., by
+ * changing the default tolerance).
+ * The caller is responsible of providing a checker where such state
+ * changes do not matter.
+ */
+ virtual void checkStream(TextInputStream* stream, TestReferenceChecker* checker) = 0;
};
//! Smart pointer for managing a ITextBlockMatcher.
*/
class ITextBlockMatcherSettings
{
- public:
- //! Factory method that constructs the matcher after parameters are set.
- virtual TextBlockMatcherPointer createMatcher() const = 0;
+public:
+ //! Factory method that constructs the matcher after parameters are set.
+ virtual TextBlockMatcherPointer createMatcher() const = 0;
- protected:
- virtual ~ITextBlockMatcherSettings();
+protected:
+ virtual ~ITextBlockMatcherSettings();
};
/*! \libinternal \brief
*/
class ExactTextMatch : public ITextBlockMatcherSettings
{
- public:
- TextBlockMatcherPointer createMatcher() const override;
+public:
+ TextBlockMatcherPointer createMatcher() const override;
};
/*! \libinternal \brief
*/
class NoTextMatch : public ITextBlockMatcherSettings
{
- public:
- TextBlockMatcherPointer createMatcher() const override;
+public:
+ TextBlockMatcherPointer createMatcher() const override;
};
/*! \libinternal \brief
*/
class FilteringExactTextMatch : public ITextBlockMatcherSettings
{
- public:
- //! Constructor
- explicit FilteringExactTextMatch(std::vector<std::string> linesToSkip);
- //! Factory method.
- TextBlockMatcherPointer createMatcher() const override;
- //! Add a regular expression for which a matching line should be skipped.
- void addRegexToSkip(const std::string &lineToSkip);
- private:
- //! The regular expressions for lines that should be skipped.
- std::vector<std::string> linesToSkip_;
-
+public:
+ //! Constructor
+ explicit FilteringExactTextMatch(std::vector<std::string> linesToSkip);
+ //! Factory method.
+ TextBlockMatcherPointer createMatcher() const override;
+ //! Add a regular expression for which a matching line should be skipped.
+ void addRegexToSkip(const std::string& lineToSkip);
+
+private:
+ //! The regular expressions for lines that should be skipped.
+ std::vector<std::string> linesToSkip_;
};
} // namespace test