Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Adding test code to cause segmentation violation.
Browse files Browse the repository at this point in the history
  • Loading branch information
aentinger committed Jan 21, 2021
1 parent 4293c36 commit edafe97
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions extras/test/src/test_ArduinoNmeaParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,10 @@ TEST_CASE("Multiple NMEA messages received", "[Parser-06]")

REQUIRE(parser.error() == ArduinoNmeaParser::Error::None);
}

TEST_CASE("NMEA message with no checksum received", "[Parser-07]")
{
ArduinoNmeaParser parser(nullptr, nullptr);
std::string const GPRMC = "79\r\n"; /* This should not lead to a segmentation violation. */
encode(parser, GPRMC);
}

0 comments on commit edafe97

Please sign in to comment.