mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
PrintTo functions for google test and valgrind
This commit is contained in:
parent
4a482b07ea
commit
e10d2eb269
@ -287,3 +287,8 @@ static const MultiaccelTestParam multiaccelTests[] = {
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(Multiaccel, MultiaccelTest, ValuesIn(multiaccelTests));
|
||||
|
||||
// boring stuff for google test
|
||||
void PrintTo(const MultiaccelTestParam &p, ::std::ostream *os) {
|
||||
*os << "MultiaccelTestParam: " << p.match_pattern;
|
||||
}
|
||||
|
@ -103,3 +103,9 @@ TEST_P(NFAPureRepeatTest, Check) {
|
||||
ASSERT_EQ(t.minBound, repeat.bounds.min);
|
||||
ASSERT_EQ(t.maxBound, repeat.bounds.max);
|
||||
}
|
||||
|
||||
// for google test
|
||||
void PrintTo(const PureRepeatTest &p, ::std::ostream *os) {
|
||||
*os << "PureRepeatTest: " << p.pattern
|
||||
<< "{" << p.minBound << ',' << p.maxBound << '}';
|
||||
}
|
||||
|
@ -84,3 +84,14 @@ TEST_P(NFAWidthTest, Check) {
|
||||
ASSERT_EQ(t.minWidth, findMinWidth(*w));
|
||||
ASSERT_EQ(t.maxWidth, findMaxWidth(*w));
|
||||
}
|
||||
|
||||
// for google test
|
||||
void PrintTo(const WidthTest &w, ::std::ostream *os) {
|
||||
*os << "WidthTest: " << w.pattern << "{" << w.minWidth << ',';
|
||||
if (w.maxWidth == depth::infinity()) {
|
||||
*os << "inf";
|
||||
} else {
|
||||
*os << w.maxWidth;
|
||||
}
|
||||
*os << '}';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user