Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
Matthew Kennedy 2020-12-12 20:40:05 -08:00 committed by GitHub
parent 317a62ee5b
commit 378d118118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -422,9 +422,8 @@ LEElement *LEElementPool::parseExpression(const char * line) {
/**
* Cannot recognize token
*/
#if ! EFI_UNIT_TEST
firmwareError(CUSTOM_ERR_PARSING_ERROR, "unrecognized FSIO keyword [%s]", parsingBuffer);
#endif
return nullptr;
}
n->init(action);

View File

@ -195,6 +195,11 @@ TEST(fsio, extraOperators) {
testExpression("0 22 33 if", 33);
}
TEST(fsio, invalidFunction) {
EXPECT_FATAL_ERROR(testExpression("bogus_function", 0));
EXPECT_FATAL_ERROR(testExpression("1 2 + bogus_expression *", 0));
}
TEST(fsio, testLogicExpressions) {
{
@ -248,10 +253,6 @@ TEST(fsio, testLogicExpressions) {
e->init(LE_OPERATOR_OR);
pool.reset();
LEElement *element;
element = pool.parseExpression("fan no_such_method");
ASSERT_TRUE(element == NULL) << "NULL expected";
}
/**