tests: Verify ExpressionMatch test data won't OOB
authorShane Synan <digitalcircuit36939@gmail.com>
Thu, 30 May 2019 20:19:18 +0000 (16:19 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 31 May 2019 14:41:59 +0000 (16:41 +0200)
commitdd1d9d68c406b993230161208cbd17db55dc85a9
treed028f37a1ee91b9dd88a86f9d9c214b452127eef
parentc41e04630e685bbd4c4cbd5d331f16c496b2ef8f
tests: Verify ExpressionMatch test data won't OOB

Verify that the ExpressionMatch test data for test
trimMultiWildcardWhitespace won't try to access out of bounds data by
changing EXPECT to ASSERT for patternPair.size() == 2.

If the test data is wrong, the results will be undefined, so there's
no point in continuing the test.

Alternative: use std::vector's .at() function, which will raise a
runtime error if out of bounds.
tests/common/expressionmatchtest.cpp