Tests: Cover some internal code coverage issues

This commit is contained in:
Wilson Snyder
2021-03-07 13:52:37 -05:00
parent a9d61a8bff
commit 6ff1911110
27 changed files with 228 additions and 17 deletions
+7 -1
View File
@@ -272,7 +272,7 @@ public:
m_lexp->m_keepComments = keepComments();
m_lexp->m_keepWhitespace = keepWhitespace();
m_lexp->m_pedantic = pedantic();
m_lexp->debug(debug() >= 5 ? debug() : 0); // See also V3PreProc::debug() method
debug(debug()); // Set lexer debug via V3PreProc::debug() method
}
~V3PreProcImp() override {
if (m_lexp) VL_DO_CLEAR(delete m_lexp, m_lexp = nullptr);
@@ -486,6 +486,12 @@ void V3PreProcImp::comment(const string& text) {
//*************************************************************************
// VPreProc Methods.
void V3PreProc::debug(int level) {
m_debug = level;
V3PreProcImp* idatap = static_cast<V3PreProcImp*>(this);
if (idatap->m_lexp) idatap->m_lexp->debug(debug() >= 5 ? debug() : 0);
}
FileLine* V3PreProc::fileline() {
V3PreProcImp* idatap = static_cast<V3PreProcImp*>(this);
return idatap->m_lexp->m_tokFilelinep;