Skip to content

test: re-enable cmp_tribool (fixes #15) - #50

Merged
Lastique merged 1 commit into
boostorg:developfrom
reach2sayan:fix/reenable-cmp-tribool
Sep 28, 2026
Merged

Lastique merged 1 commit into
boostorg:developfrom
reach2sayan:fix/reenable-cmp-tribool

Conversation

@reach2sayan

Copy link
Copy Markdown
Contributor

cmp_tribool was disabled back in 2018 (385aae0) because it didn't compile: tribool only has an explicit operator bool, and Boost.Test's BOOST_CHECK needed an implicit one.

BOOST_CHECK(a < b);   // a < b is a tribool -> error

That went away in 2021 when the tests moved to Lightweight Test (53ba1b1). Its BOOST_TEST does (expr) ? true : false, which works fine with an explicit conversion. The test just never got turned back on, and #49 carried the commented-out line over into CMake.

So this only re-enables it in both build systems and links Boost.Logic. cmp_tribool.cpp` itself is unchanged.

Also put my full name in the CMakeLists.txt copyright line.

The boostorg#15 failure was in Boost.Test's assertion_result, which could not take a tribool once its bool conversion became explicit. The suite now uses lightweight_test, whose BOOST_TEST uses a contextual bool conversion, so the test compiles and passes on gcc and clang. Also spell out the full name in the test/CMakeLists.txt copyright line.
@codecov

codecov Bot commented Sep 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.90%. Comparing base (5f594ad) to head (20fe970).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #50      +/-   ##
===========================================
+ Coverage    78.00%   81.90%   +3.90%     
===========================================
  Files           22       22              
  Lines          923      923              
  Branches       373      373              
===========================================
+ Hits           720      756      +36     
+ Misses         196      160      -36     
  Partials         7        7              

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f594ad...20fe970. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reach2sayan

Copy link
Copy Markdown
Contributor Author

@Lastique This is shouldn't be controversial and does clear an issue

@Lastique
Lastique merged commit d9ad29a into boostorg:develop Sep 28, 2026
56 checks passed
@reach2sayan
reach2sayan deleted the fix/reenable-cmp-tribool branch September 29, 2026 11:13
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