Skip to content

Commit 36788c1

Browse files
committed
Merge branch 'main' into feature/improve-console-output-on-missing-and-ambiguous-steps
2 parents addc50e + ba517e0 commit 36788c1

File tree

16 files changed

+47
-78
lines changed

16 files changed

+47
-78
lines changed

.github/workflows/linting-formatting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
VALIDATE_ALL_CODEBASE: true
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
- run: git diff
35-
- uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
35+
- uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
3636
if: ${{ success() || failure() }}
3737
with:
3838
sarif_file: megalinter-reports/megalinter-report.sarif

.github/workflows/security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ jobs:
3131
results_format: sarif
3232
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
3333
publish_results: true
34-
- uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
34+
- uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
3535
with:
3636
sarif_file: scorecards.sarif

.github/workflows/static-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ jobs:
7373
- uses: hendrikmuhs/ccache-action@63069e3931dedbf3b63792097479563182fe70d1 # v1.2.18
7474
with:
7575
key: ${{ github.job }}
76-
- uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
76+
- uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
7777
with:
7878
languages: cpp
7979
- uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10.8
8080
with:
8181
configurePreset: "Host"
8282
buildPreset: "Host-Debug"
8383
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']"
84-
- uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
84+
- uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2

cucumber_cpp/acceptance_test/features/test_scenarios.feature

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,5 @@ Feature: Simple feature file
1818

1919
@result:UNDEFINED
2020
Scenario: A scenario with undefined step
21-
Given a given step
22-
When a when step
23-
Then a missing step
24-
Then a then step
21+
Given a missing step
22+
Then this should be skipped

cucumber_cpp/acceptance_test/hooks/Hooks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cucumber_cpp/library/Hooks.hpp"
1+
#include "cucumber_cpp/CucumberCpp.hpp"
22
#include "gmock/gmock.h"
33
#include <iostream>
44
#include <string>

cucumber_cpp/acceptance_test/steps/Steps.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#include "cucumber_cpp/library/Steps.hpp"
1+
#include "cucumber_cpp/CucumberCpp.hpp"
22
#include "gmock/gmock.h"
33
#include "gtest/gtest.h"
4-
#include <cstdint>
54
#include <iostream>
65
#include <string>
76

@@ -60,3 +59,8 @@ GIVEN("this is ambiguous( or not)")
6059
{
6160
// empty
6261
}
62+
63+
THEN("this should be skipped")
64+
{
65+
FAIL();
66+
}

cucumber_cpp/acceptance_test/test.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ teardown() {
3030
run .build/Host/cucumber_cpp/acceptance_test/Debug/cucumber_cpp.acceptance_test run --tag "@result:UNDEFINED" --feature cucumber_cpp/acceptance_test/features --report console
3131
assert_failure
3232
assert_output --partial "undefined \"cucumber_cpp/acceptance_test/features/test_scenarios.feature\""
33-
assert_output --partial "skipped Then a then step"
33+
assert_output --partial "skipped Then this should be skipped"
3434
}
3535

3636
@test "No tests" {
@@ -128,7 +128,7 @@ teardown() {
128128
assert_failure
129129
assert_output --partial "Step missing: \"a missing step\""
130130
assert_output --partial "undefined \"cucumber_cpp/acceptance_test/features/test_scenarios.feature\""
131-
assert_output --partial "skipped Then a then step"
131+
assert_output --partial "skipped Then this should be skipped"
132132
}
133133

134134
@test "Dry run with known ambiguous steps" {

cucumber_cpp/library/Application.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef CUCUMBER_CPP_APPLICATION_HPP
22
#define CUCUMBER_CPP_APPLICATION_HPP
33

4+
// IWYU pragma: private, include "cucumber_cpp/CucumberCpp.hpp"
5+
// IWYU pragma: friend cucumber_cpp/.*
6+
47
#include "cucumber/gherkin/app.hpp"
58
#include "cucumber_cpp/library/Context.hpp"
69
#include "cucumber_cpp/library/cucumber_expression/ParameterRegistry.hpp"

cucumber_cpp/library/Context.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef CUCUMBER_CPP_CONTEXT_HPP
22
#define CUCUMBER_CPP_CONTEXT_HPP
33

4+
// IWYU pragma: private, include "cucumber_cpp/CucumberCpp.hpp"
5+
// IWYU pragma: friend cucumber_cpp/.*
6+
47
#include <algorithm>
58
#include <forward_list>
69
#include <iostream>

cucumber_cpp/library/Hooks.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef CUCUMBER_CPP_HOOKS_HPP
22
#define CUCUMBER_CPP_HOOKS_HPP
33

4+
// IWYU pragma: private, include "cucumber_cpp/CucumberCpp.hpp"
5+
// IWYU pragma: friend cucumber_cpp/.*
6+
47
#include "cucumber_cpp/library/BodyMacro.hpp"
58
#include "cucumber_cpp/library/HookRegistry.hpp"
69

0 commit comments

Comments
 (0)