-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature and stability updates #7
Open
Sp3EdeR
wants to merge
7
commits into
michaelvlach:master
Choose a base branch
from
rolling-wireless:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sp3EdeR
commented
Nov 16, 2023
- Added support for gTest v1.12.0 (fixed multiple compilation issues)
- Added typed test support for gTest (SCENARIO_T)
- Added support for gMock expectations by provising the THEN(EXPECT()) clause. This allows writing "then" statements before writing the "when" section while keeping the output fully BDD compatible.
- Added checks against using the same clause multiple times in a scenario.
Description: cppbdd fails to compile with current googletest (newer than v1.12.0): thirdparty/cppbdd/include/cppbdd/gtestbdd.h:155:50: error: ISO C++ forbids declaration of ‘GTEST_DISALLOW_COPY_AND_ASSIGN_’ with no type [-fpermissive] 155 | GTEST_DISALLOW_COPY_AND_ASSIGN_(TestClass);\ | ^ Root Cause: Since googletest v1.12.0 the GTEST_DISALLOW_COPY_AND_ASSIGN_ macro was removed by commit bf66935e ("Remove the legacy internal GTEST_DISALLOW_* macros", 2022-04-22). Solution: Replace the macro by plain C++ code (as was done by googletest itself). Resolves: SWPF-241 Change-Id: Ic38be1adfaf0e0228bc79c029b52410d2d564d3a Signed-off-by: Sandor Bodo-Merle <[email protected]>
Description: Replace INSTANTIATE_TEST_CASE_P macro with the current recommended INSTANTIATE_TEST_SUITE_P macro. Root Cause: Since v1.10.0 GoogleTest deprecated the INSTANTIATE_TEST_SUITE_P macro in commit 52ea4f7b ("Mark legacy _TEST_CASE_ macros as deprecated", 2019-02-04). Solution: s/INSTANTIATE_TEST_CASE_P/INSTANTIATE_TEST_SUITE_P/ Resolves: SWPF-260 Change-Id: Id46f56f6f5995039de9fb50daddc3b0a3896fd65 Signed-off-by: Sandor Bodo-Merle <[email protected]>
Description: Introduce the SCENARIO_T macro. Root Cause: CPPBDD does not provide Type Tests. Solution: Introduce MAKE_SCENARIO_T based on https://github.com/google/googletest/blob/v1.13.0/googletest/include/gtest/gtest-typed-test.h#L197-L224 The name mapping used was : FixtureClass == CaseName Note - it also replaces the deprecated GTEST_DISALLOW_COPY_AND_ASSIGN_ macro in MAKE_SCENARIO_P. Resolves: SWPF-260 Change-Id: I9c60f24c800e28cfc4f30ced4465e31c8aedcce2 Signed-off-by: Sandor Bodo-Merle <[email protected]>
Description: When a test uses GMOCK, the mock instrumentation may contain expectations as well, so we would like to add THEN parts to the BDD scenario after the GIVEN part which will printed out just before the THEN part. Root Cause: New Feature Solution: Add EXPECT macro which can be used inside THEN macro Resolves: SWPF-256 Change-Id: If2415b46105894c10d00bdb10f5acae4ec9d90e7
Description: error message: > comparison of integer expressions of different signedness: 'int' > and 'std::vector<std::__cxx11::basic_string<char> >::size_type' > {aka 'long unsigned int'} [-Werror=sign-compare] > 103 | for (auto i = 1; i < mThenExpects.size(); ++i) Root Cause: Introduction of -Werror flag. Solution: Changed auto to unsigned long. Resolves: SWPF-326 Change-Id: Idebb78a1ed2adfaeb5f779de9d587f1fc691a32b Signed-off-by: Orgilbold Zardikan <[email protected]>
Description: Fixing the MAKE_SCENARIO_P macro Root Cause: It was fitted to an older version of gtest Solution: Fitted to the current version Resolves: SWPF-255 Change-Id: I1bd6ac697e76f673b674680fa266ff59839055a0 Signed-off-by: attila.vago <[email protected]>
Description: A BDD scenario should only allow defining Root Cause: New Feature Resolves: SWPF-892 Change-Id: I1db58f98845cba7e65ca492a1a31efe3a5cea69a Signed-off-by: Robert Jamnitzky <[email protected]>
If you need me to split the PR, I can do it. I just didn't want to put in the additional work in case it is not needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.