15 #include <gtest/gtest.h>
25 class expected_assert;
44 string_matcher(string_view svValue,
bool bRegex);
45 bool matches(string_view svValue)
const;
46 string_view get_pattern()
const;
47 bool is_regex()
const;
51 std::optional<std::basic_regex<char_type>> m_Regex;
114 std::optional<string_matcher> m_Condition;
116 std::optional<assert_type> m_Type;
117 std::optional<string_matcher> m_Message;
118 std::optional<string_matcher> m_Function;
119 std::optional<string_matcher> m_File;
120 std::optional<i32> m_Line;
153 std::atomic_size_t m_nActual = 0;
A category is a class that identifies a particular piece of code. This code can be located in differe...
Selects assertion properties and the number of expected occurrences.
expected_assert_builder & file(string_view svFile, bool bRegex=false)
Match the source file name.
expected_assert_builder & condition(string_view svCondition, bool bRegex=false)
Match the failed condition text.
expected_assert_builder & category(const qx::category &category)
Require the specified assertion category.
expected_assert build() const
Start observing assertions using the selected criteria.
expected_assert_builder & type(assert_type eType)
Require the specified assertion type.
expected_assert_builder & message(string_view svPattern, bool bRegex=false)
Match the formatted user message.
expected_assert_builder & count(size_t nCount)
Require exactly this many matching assertions.
expected_assert_builder & line(i32 nLine)
Require the exact source line number.
Counts assertions matching the criteria selected by expected_assert_builder.
#define QX_NONCOPYMOVABLE(className)
Define class as non copyable and non movable.
#define QX_PUSH_SUPPRESS_ALL_WARNINGS()
Disable all warnings.
#define QX_POP_SUPPRESS_WARNINGS()
Enable all warnings.
std::int32_t i32
− 9 223 372 036 854 775 808 .. 9 223 372 036 854 775 807