Skip to content

Commit 03832cd

Browse files
committed
fix bats-acceptance tests
1 parent 2d07945 commit 03832cd

File tree

11 files changed

+166
-370
lines changed

11 files changed

+166
-370
lines changed

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
- name: Run acceptance tests
4646
run: |
47-
bats --formatter junit cucumber_cpp/acceptance_test/coverage.bats | tee test-report.xml
47+
bats --formatter junit cucumber_cpp/acceptance_test/test.bats | tee test-report.xml
4848
4949
- name: Collect coverage
5050
run: |

compatibility/compatibility.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
#include "cucumber_cpp/CucumberCpp.hpp"
33
#include "cucumber_cpp/library/api/RunCucumber.hpp"
44
#include "cucumber_cpp/library/cucumber_expression/ParameterRegistry.hpp"
5+
#include "cucumber_cpp/library/support/Duration.hpp"
56
#include "cucumber_cpp/library/support/Timestamp.hpp"
67
#include "cucumber_cpp/library/support/Types.hpp"
8+
#include "cucumber_cpp/library/tag_expression/Parser.hpp"
79
#include "cucumber_cpp/library/util/Broadcaster.hpp"
8-
#include "library/support/Duration.hpp"
910
#include "nlohmann/json.hpp"
1011
#include "nlohmann/json_fwd.hpp"
1112
#include "gmock/gmock.h"
@@ -248,7 +249,7 @@ namespace compatibility
248249
cucumber_cpp::library::support::RunOptions runOptions{
249250
.sources = {
250251
.paths = devkit.paths,
251-
.tagExpression = devkit.tagExpression,
252+
.tagExpression = cucumber_cpp::library::tag_expression::Parse(devkit.tagExpression),
252253
.ordering = isReversed ? cucumber_cpp::library::support::RunOptions::Ordering::reverse : cucumber_cpp::library::support::RunOptions::Ordering::defined,
253254
},
254255
.runtime = {

cucumber_cpp/acceptance_test/coverage.bats

Lines changed: 0 additions & 208 deletions
This file was deleted.

cucumber_cpp/acceptance_test/hooks/Hooks.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "cucumber_cpp/CucumberCpp.hpp"
22
#include "gmock/gmock.h"
3+
#include <gtest/gtest.h>
34
#include <iostream>
45
#include <string>
56

@@ -8,7 +9,7 @@ HOOK_BEFORE_ALL()
89
std::cout << "HOOK_BEFORE_ALL\n";
910

1011
if (context.Contains("--failprogramhook") && context.Get<bool>("--failprogramhook"))
11-
ASSERT_THAT(false, testing::IsTrue());
12+
FAIL();
1213
}
1314

1415
HOOK_AFTER_ALL()
@@ -38,12 +39,12 @@ HOOK_AFTER_STEP("@stephook and @bats")
3839

3940
HOOK_BEFORE_SCENARIO("@fail_scenariohook_before")
4041
{
41-
ASSERT_THAT(false, testing::IsTrue());
42+
FAIL();
4243
}
4344

4445
HOOK_AFTER_SCENARIO("@fail_scenariohook_after")
4546
{
46-
ASSERT_THAT(false, testing::IsTrue());
47+
FAIL();
4748
}
4849

4950
HOOK_BEFORE_SCENARIO("@throw_scenariohook")

0 commit comments

Comments
 (0)