◐ Shell
reader mode source ↗
Skip to content

test.cpp: also run tests with char buffer#261

Merged
firewave merged 3 commits into
cppcheck-opensource:masterfrom
firewave:test-x
Apr 16, 2026
Merged

test.cpp: also run tests with char buffer#261
firewave merged 3 commits into
cppcheck-opensource:masterfrom
firewave:test-x

Conversation

@firewave

Copy link
Copy Markdown
Collaborator

No description provided.

@firewave firewave changed the title test.cpp: run tests with std::istringstream and std::ifstream Apr 20, 2022
@firewave firewave changed the title run tests with std::istringstream and std::ifstream Apr 20, 2022
@firewave firewave marked this pull request as draft October 20, 2022 12:58
@firewave firewave changed the title run tests with std::istringstream and std::ifstream Mar 21, 2023
@firewave firewave changed the title run tests with std::istringstream,std::ifstream and file input Mar 28, 2024
@firewave firewave force-pushed the test-x branch 2 times, most recently from 5d99779 to b196f5b Compare March 29, 2024 18:13
@firewave firewave changed the title run tests with std::istringstream,std::ifstream,std::string and file input Mar 29, 2024
@firewave

Copy link
Copy Markdown
Collaborator Author

This could be implemented in the Python tests instead by making this modes available via simplecpp (as already is via -is). That would require to parameterize each invocation but I am not sure how to do this. @Tal500 any idea?

@firewave

Copy link
Copy Markdown
Collaborator Author

Thinking about it I think this is still valid except for the file input.

@firewave firewave force-pushed the test-x branch 4 times, most recently from 929222a to 07a2beb Compare January 15, 2026 10:09
@firewave firewave changed the title run tests with std::istringstream,std::ifstream, buffer and file input Jan 15, 2026
@firewave

Copy link
Copy Markdown
Collaborator Author

I removed everything which generates a file.

I will add flags to the CLI to be able to use those in the Python tests but that won't have the same coverage as using it in the unit tests and might detect some issues only as in drive-by way (as experienced in #566).

@Tal500

Tal500 commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

@firewave

Copy link
Copy Markdown
Collaborator Author

sorry for the very late reply. see

No problem at all. Thanks for replying.

https://github.com/danmar/simplecpp/blob/10c96815e402299da1d3ab1f753dda4c1b0b12f8/integration_test.py#L37-L39

I do get have parameterizing works but this requires every simplecpp call to gain an additional parameter so this needs needs something global. Possibly requiring a fixture (or whatever it is called in Python).

BTW I moved that to #625.

@firewave firewave marked this pull request as ready for review April 13, 2026 11:36
Hide details View details @firewave firewave merged commit 316d4ee into cppcheck-opensource:master Apr 16, 2026
24 checks passed
@firewave firewave deleted the test-x branch April 16, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants