Skip to content

fix: remove tautology assertions in tests#786

Merged
annejan merged 1 commit into
mainfrom
fix/test-tautologies
Mar 27, 2026
Merged

fix: remove tautology assertions in tests#786
annejan merged 1 commit into
mainfrom
fix/test-tautologies

Conversation

@nogeenhenk
Copy link
Copy Markdown
Contributor

@nogeenhenk nogeenhenk commented Mar 27, 2026

Summary

Found by GitHub AI-powered bug detection.

tests/auto/settings/tst_settings.cpp

Fixed tautology assertions:

  1. getProfilesEmpty(): Changed QVERIFY(profiles.isEmpty() || !profiles.isEmpty()) (always true) → QVERIFY(profiles.isEmpty())

  2. getPassStore(): Changed QVERIFY(!store.isEmpty() || store.isEmpty()) (always true) → proper path validation

  3. setAndGetClipBoardType(): Added assertion to verify getter returns the set value

  4. setAndGetProfileDefault(): Changed tautology → proper equality check

tests/auto/util/tst_util.cpp

Fixed test issues:

  1. checkConfig(): Removed tautology assertion, just call function to ensure it doesn't crash

  2. getRecipientStringCount(): Added QCOMPARE(recipients, recipientsNoCount) to verify both API variants return same results

@nogeenhenk nogeenhenk force-pushed the fix/test-tautologies branch from 96bb47a to 4426a54 Compare March 27, 2026 18:15
@nogeenhenk nogeenhenk requested a review from annejan March 27, 2026 18:19
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 18.41% (+0.1%) from 18.29%
when pulling 4426a54 on fix/test-tautologies
into dcc19fe on main.

@annejan annejan merged commit 2d0605b into main Mar 27, 2026
16 of 17 checks passed
@annejan annejan deleted the fix/test-tautologies branch March 27, 2026 18:23
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