Skip to content

Include fstream in C++ tests reading files - #848

Merged
mristin merged 1 commit into
mainfrom
mristin/Include-fstream-in-C++-tests-reading-files
Oct 15, 2026
Merged

mristin merged 1 commit into
mainfrom
mristin/Include-fstream-in-C++-tests-reading-files

Conversation

@mristin

@mristin mristin commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Since #846, the generated tests no longer define CATCH_CONFIG_MAIN, so catch.hpp no longer brings in <fstream>, and clang refuses test_verification.cpp and test_xmlization_of_concrete_classes.cpp with implicit instantiation of undefined template 'std::basic_ifstream<char>'. We include <fstream> explicitly in both tests, which use std::ifstream.

Since #846, the generated tests no longer define ``CATCH_CONFIG_MAIN``,
so ``catch.hpp`` no longer brings in ``<fstream>``, and clang refuses
``test_verification.cpp`` and ``test_xmlization_of_concrete_classes.cpp``
with ``implicit instantiation of undefined template
'std::basic_ifstream<char>'``. We include ``<fstream>`` explicitly in
both tests, which use ``std::ifstream``.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 38774558943

Coverage remained the same at 90.142%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 50225
Covered Lines: 45274
Line Coverage: 90.14%
Coverage Strength: 2.7 hits per line

💛 - Coveralls

@mristin
mristin merged commit a310a78 into main Oct 15, 2026
5 checks passed
@mristin
mristin deleted the mristin/Include-fstream-in-C++-tests-reading-files branch October 15, 2026 18:08
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.

2 participants