Skip to content

Fix integration tests#472

Merged
Krzmbrzl merged 8 commits intoValeevGroup:masterfrom
Krzmbrzl:fix-integration-tests
Jan 31, 2026
Merged

Fix integration tests#472
Krzmbrzl merged 8 commits intoValeevGroup:masterfrom
Krzmbrzl:fix-integration-tests

Conversation

@Krzmbrzl
Copy link
Collaborator

@Krzmbrzl Krzmbrzl commented Jan 30, 2026

  • Ensure tests fail if passed invalid CLI args
  • Fix CMake passing CLI arguments
  • Fix SF test case failures

This is what downstream users will expect and allows for
sequant::Exception to be caught in general catch(const std::exception &)
clauses.
The important trait of these functions is that they will throw on
invalid input rather than performing partial parses or silently
returning a default value on invalid input.
The change is necessary as 4deff46 has
changed the order in which external_indices(…) returns indices. These
instances have been missed before due to invalid CLI parameter handling
when executing the integration tests along with the tests not failing
upon those illegal parameters. These issues have been addressed in
dce831f and
13296ec respectively.

Fixes ValeevGroup#471 (second half)
@Krzmbrzl Krzmbrzl requested a review from evaleev January 30, 2026 17:24
@Krzmbrzl Krzmbrzl force-pushed the fix-integration-tests branch 3 times, most recently from b342beb to e9ccd55 Compare January 30, 2026 19:00
@Krzmbrzl Krzmbrzl force-pushed the fix-integration-tests branch from e9ccd55 to e06ad9c Compare January 30, 2026 19:13
public:
Exception(const std::string& str) : msg_(str) {}
virtual std::string_view what() const { return msg_; }
virtual const char* what() const noexcept { return msg_.data(); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not clear to me why not use the safer alternative to C "strings"?

Copy link
Collaborator Author

@Krzmbrzl Krzmbrzl Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because std::exception defines the interface for what() to return const char *. Hence, we can't change that (in this way) here, unless I am missing something 👀

Besides, general wisdom typically states that one shouldn't return views (as that can create lifetime issues) - only take them as input parameters… Admittedly, this doesn't apply to this case as a C string is effectively also a kind of view 🤷

@evaleev
Copy link
Member

evaleev commented Jan 31, 2026

seems to fix all issues spotted in #471 ... ?

@Krzmbrzl
Copy link
Collaborator Author

seems to fix all issues spotted in #471 ... ?

I think so, yes

@Krzmbrzl Krzmbrzl merged commit 196e040 into ValeevGroup:master Jan 31, 2026
8 checks passed
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.

Integration tests are not being run properly and some are actually failing

3 participants