mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
SMTChecker: Keep counterexamples on test expectation update
This commit is contained in:
parent
83fe3d4011
commit
2e38798408
@ -140,6 +140,7 @@ TestCase::TestResult SMTCheckerTest::run(ostream& _stream, string const& _linePr
|
|||||||
void SMTCheckerTest::filterObtainedErrors()
|
void SMTCheckerTest::filterObtainedErrors()
|
||||||
{
|
{
|
||||||
SyntaxTest::filterObtainedErrors();
|
SyntaxTest::filterObtainedErrors();
|
||||||
|
m_unfilteredErrorList = m_errorList;
|
||||||
|
|
||||||
static auto removeCex = [](vector<SyntaxTestError>& errors) {
|
static auto removeCex = [](vector<SyntaxTestError>& errors) {
|
||||||
for (auto& e: errors)
|
for (auto& e: errors)
|
||||||
@ -156,3 +157,10 @@ void SMTCheckerTest::filterObtainedErrors()
|
|||||||
removeCex(m_errorList);
|
removeCex(m_errorList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SMTCheckerTest::printUpdatedExpectations(ostream &_stream, const string &_linePrefix) const {
|
||||||
|
if (!m_unfilteredErrorList.empty())
|
||||||
|
printErrorList(_stream, m_unfilteredErrorList, _linePrefix, false);
|
||||||
|
else
|
||||||
|
CommonSyntaxTest::printUpdatedExpectations(_stream, _linePrefix);
|
||||||
|
}
|
||||||
|
@ -42,6 +42,8 @@ public:
|
|||||||
|
|
||||||
void filterObtainedErrors() override;
|
void filterObtainedErrors() override;
|
||||||
|
|
||||||
|
void printUpdatedExpectations(std::ostream& _stream, std::string const& _linePrefix) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*
|
/*
|
||||||
Options that can be set in the test:
|
Options that can be set in the test:
|
||||||
@ -62,6 +64,8 @@ protected:
|
|||||||
ModelCheckerSettings m_modelCheckerSettings;
|
ModelCheckerSettings m_modelCheckerSettings;
|
||||||
|
|
||||||
bool m_ignoreCex = false;
|
bool m_ignoreCex = false;
|
||||||
|
|
||||||
|
std::vector<SyntaxTestError> m_unfilteredErrorList;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user