Skip to content

Commit 370ab37

Browse files
committed
fix windows build issues
1 parent 921d7f1 commit 370ab37

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

cucumber_cpp/library/tag_expression/Model.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ namespace cucumber_cpp::library::tag_expression
1010
{
1111
struct Expression
1212
{
13+
virtual ~Expression() = default;
14+
1315
virtual bool Evaluate(const std::set<std::string, std::less<>>& tags) const = 0;
1416
virtual operator std::string() const = 0;
1517
};

cucumber_cpp/library/tag_expression/test/TestErrors.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

cucumber_cpp/library/tag_expression/test/TestEvaluations.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "yaml-cpp/node/node.h"
44
#include "yaml-cpp/node/parse.h"
55
#include "yaml-cpp/yaml.h"
6-
#include "gtest/gtest.h"
76
#include <cstdlib>
87
#include <filesystem>
98
#include <format>
@@ -22,7 +21,6 @@ namespace cucumber_cpp::library::tag_expression
2221
};
2322

2423
struct TestEvaluations : TestEvaluationsFixture
25-
2624
{
2725
TestEvaluations(std::string_view expression, YAML::Node variables, bool result)
2826
: expression{ expression }

0 commit comments

Comments
 (0)