pistacheio / pistache

A high-performance REST toolkit written in C++
https://pistacheio.github.io/pistache/
Apache License 2.0
3.12k stars 688 forks source link

test: more precise GTest assertions #1143

Closed Tachi107 closed 1 year ago

Tachi107 commented 1 year ago

Using EXPECT_EQ(var1, var2) instead of EXPECT_TRUE(var1 == var2) offers more helpful error messages in case of test failures. The same goes for EXPECT_STREQ("str1", "str2") vs EXPECT_EQ(strcmp("str1", "str2"), 0).

kiplingw commented 1 year ago

LGTM @Tachi107. Feel free to merge if CI doesn't break.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +0.02 :tada:

Comparison is base (dabe9fc) 78.43% compared to head (41fd4f9) 78.46%.

:exclamation: Current head 41fd4f9 differs from pull request most recent head b27bacd. Consider uploading reports for the commit b27bacd to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1143 +/- ## ========================================== + Coverage 78.43% 78.46% +0.02% ========================================== Files 53 53 Lines 6872 6872 ========================================== + Hits 5390 5392 +2 + Misses 1482 1480 -2 ``` [see 1 file with indirect coverage changes](https://app.codecov.io/gh/pistacheio/pistache/pull/1143/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Tachi107 commented 1 year ago

I've turned my pc off already, I'll leave the honour to you ;)

Il 30 giugno 2023 00:31:20 CEST, Kip @.***> ha scritto:

LGTM @Tachi107. Feel free to merge if CI doesn't break.