Skip to content

Commit

Permalink
Add a couple more assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Apr 3, 2024
1 parent 3819226 commit dab5889
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/catch2/internal/catch_textflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ namespace Catch {
}

void AnsiSkippingString::const_iterator::advance() {
assert( m_it != m_string->end() );
m_it++;
tryParseAnsiEscapes();
}
Expand Down Expand Up @@ -150,6 +151,7 @@ namespace Catch {
return;
}

assert( m_lineStart != current_line.end() );
if ( *m_lineStart == '\n' ) { ++m_parsedTo; }

const auto maxLineLength = m_column.m_width - indentSize();
Expand Down

0 comments on commit dab5889

Please sign in to comment.