Skip to content

Conversation

@geonove
Copy link
Contributor

@geonove geonove commented May 25, 2025

I noticed that this test

TEST_CASE("CM parameter suggestions", "[error parameters]") {

    // Bucket suggestions
    REQUIRE_THROWS(count_min_sketch<uint64_t>::suggest_num_buckets(-1.0), "Confidence must be between 0 and 1.0 (inclusive)." );
    
    //...

was still passing even though suggest_num_buckets throws the following error message: "Relative error must be at least 0." instead of "Confidence must be between 0 and 1.0 (inclusive).".
This is because REQUIRE_THROWS doesn't check if the error message matches.
REQUIRE_THROWS_WITH should be used instead.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 15238016718

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 98.729%

Totals Coverage Status
Change from base Build 13404673886: 0.003%
Covered Lines: 16940
Relevant Lines: 17158

💛 - Coveralls

@AlexanderSaydakov AlexanderSaydakov merged commit 87c9c4a into apache:master May 28, 2025
5 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.

3 participants