Permalink
Browse files

Parser test: allow two different versions of an error message (cellml…

…#218).

We now allow both "Specification mandate value for attribute bearded.”
and "Specification mandates value for attribute bearded." since the
former is at least needed on Ubuntu 16.04 LTS and the latter on macOS
High Sierra.
  • Loading branch information...
agarny committed Oct 26, 2017
1 parent 28b696c commit 16ebd6cf442827b8cde99608859ab13338b0b493
Showing with 7 additions and 2 deletions.
  1. +7 −2 tests/parser/parser.cpp
View
@@ -46,9 +46,14 @@ TEST(Parser, invalidXMLElements) {
libcellml::Parser p;
p.parseModel(input);
EXPECT_EQ(expectedErrors.size(), p.errorCount());
EXPECT_EQ(expectedErrors.size()-1, p.errorCount());
for (size_t i = 0; i < p.errorCount(); ++i) {
EXPECT_EQ(expectedErrors.at(i), p.getError(i)->getDescription());
if (i == 0) {
EXPECT_TRUE( !p.getError(i)->getDescription().compare(expectedErrors.at(0))
|| !p.getError(i)->getDescription().compare(expectedErrors.at(1)));
} else {
EXPECT_EQ(expectedErrors.at(i+1), p.getError(i)->getDescription());
}
}
}

0 comments on commit 16ebd6c

Please sign in to comment.