@@ -8,7 +8,7 @@ namespace cucumber_cpp::library::tag_expression
88{
99 struct TestErrors : testing::Test
1010 {
11- void ExpectErrror (std::string_view expression, std::string_view error)
11+ void ExpectError (std::string_view expression, std::string_view error)
1212 {
1313 ASSERT_THROW (try { TagExpressionParser{}.Parse (expression); } catch (const TagExpressionError& ex) {
1414 std::cout << " expected: " << error << " \n " ;
@@ -20,57 +20,57 @@ namespace cucumber_cpp::library::tag_expression
2020
2121 TEST_F (TestErrors, ParseFailsWithUnbalancedParens)
2222 {
23- ExpectErrror (" ( a and b ))" , " Missing '(': Too few open-parens" );
24- ExpectErrror (" ( ( a and b )" , " Unclosed '(': Too many open-parens" );
23+ ExpectError (" ( a and b ))" , " Missing '(': Too few open-parens" );
24+ ExpectError (" ( ( a and b )" , " Unclosed '(': Too many open-parens" );
2525 }
2626
2727 TEST_F (TestErrors, ParseFailsWithMissingOperationArgs)
2828 {
29- ExpectErrror (" a not ( and )" , " Syntax error. Expected operator after a" );
29+ ExpectError (" a not ( and )" , " Syntax error. Expected operator after a" );
3030 }
3131
3232 TEST_F (TestErrors, ParseFailsWithOnlyOperations)
3333 {
34- ExpectErrror (" or or" , " Syntax error. Expected operand after BEGIN" );
34+ ExpectError (" or or" , " Syntax error. Expected operand after BEGIN" );
3535 }
3636
3737 TEST_F (TestErrors, ParseFailsForArgsWithoutOperation)
3838 {
39- ExpectErrror (" a b" , " Syntax error. Expected operator after a" );
39+ ExpectError (" a b" , " Syntax error. Expected operator after a" );
4040 }
4141
4242 TEST_F (TestErrors, ParseFailsForEmptyParensGroups)
4343 {
44- ExpectErrror (" (())" , " Syntax error. Expected operand after (" );
45- ExpectErrror (" (() ())" , " Syntax error. Expected operand after (" );
44+ ExpectError (" (())" , " Syntax error. Expected operand after (" );
45+ ExpectError (" (() ())" , " Syntax error. Expected operand after (" );
4646 }
4747
4848 TEST_F (TestErrors, ParseFailsWithRpnNotation)
4949 {
50- ExpectErrror (" a b or" , " Syntax error. Expected operator after a" );
51- ExpectErrror (" a and (b not)" , " Syntax error. Expected operator after b" );
52- ExpectErrror (" a and (b c) or" , " Syntax error. Expected operator after b" );
50+ ExpectError (" a b or" , " Syntax error. Expected operator after a" );
51+ ExpectError (" a and (b not)" , " Syntax error. Expected operator after b" );
52+ ExpectError (" a and (b c) or" , " Syntax error. Expected operator after b" );
5353 }
5454
5555 TEST_F (TestErrors, ParseFailsAndOperationWithTooFewArgs)
5656 {
57- ExpectErrror (" a and " , " and: Too few operands" );
58- ExpectErrror (" and b" , " Syntax error. Expected operand after BEGIN" );
57+ ExpectError (" a and " , " and: Too few operands" );
58+ ExpectError (" and b" , " Syntax error. Expected operand after BEGIN" );
5959 }
6060
6161 TEST_F (TestErrors, ParseFailsOrOperationWithTooFewArgs)
6262 {
63- ExpectErrror (" a or " , " or: Too few operands" );
64- ExpectErrror (" or b" , " Syntax error. Expected operand after BEGIN" );
65- ExpectErrror (" a and b or " , " or: Too few operands" );
63+ ExpectError (" a or " , " or: Too few operands" );
64+ ExpectError (" or b" , " Syntax error. Expected operand after BEGIN" );
65+ ExpectError (" a and b or " , " or: Too few operands" );
6666 }
6767
6868 TEST_F (TestErrors, ParseFailsNotOperationWithTooFewArgs)
6969 {
70- ExpectErrror (" not " , " not: Too few operands" );
71- ExpectErrror (" not ()" , " Syntax error. Expected operand after (" );
72- ExpectErrror (" not () and b" , " Syntax error. Expected operand after (" );
73- ExpectErrror (" not () or b" , " Syntax error. Expected operand after (" );
70+ ExpectError (" not " , " not: Too few operands" );
71+ ExpectError (" not ()" , " Syntax error. Expected operand after (" );
72+ ExpectError (" not () and b" , " Syntax error. Expected operand after (" );
73+ ExpectError (" not () or b" , " Syntax error. Expected operand after (" );
7474 }
7575
7676}
0 commit comments