Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Inconsistencies in float/string vs int/string comparisons #105

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

samarseneault
Copy link
Collaborator

To fix issue #104 , comparisons between strings and floats as well as between strings and ints were disallowed (removed)
Tests were adjusted accordingly.

The rationale is that these comparisons should not be allowed.
Therefore, their tests were moved from String  to IncompatibleTypes.
@ilpincy
Copy link
Member

ilpincy commented Mar 9, 2022

Thanks for the work! Can we remove the dependency on Google Test? I'd prefer the core of Buzz to stay in C, and to avoid extra dependencies I don't plan to maintain.

@samarseneault
Copy link
Collaborator Author

Thanks for the work! Can we remove the dependency on Google Test? I'd prefer the core of Buzz to stay in C, and to avoid extra dependencies I don't plan to maintain.

We could, either by using something like cppunit or by creating homemade tests.
However, Google Test is the most user friendly testing framework I found. In my (humble) opinion, a good test framework might be useful to incentivize future devs to contribute to tests.

@ilpincy
Copy link
Member

ilpincy commented Mar 9, 2022

I am OK with using a testing library. I just don't like dependencies for things that I could write in a couple of hours. Adding dependencies has a cost: you must maintain them, and you need to handle the case in which an OS didn't catch up with a new version, but another did. I spent 3 days fixing Qt dependency hell for this very reason, and I'd like to minimize this kind of issues.

So, what does Google Test offer that is indispensable? Can we reproduce that functionality with a small set of macros rather than adding a new dependency, whichever it is?

@samarseneault
Copy link
Collaborator Author

Hi, sorry for the delay, I was quite busy recently.

It is true that technically, macros or other custom testing code could achieve anything Google test can. In my opinion, with custom code, it would simply be harder to achieve the same test quality and integration with build tools (Github actions, CMake, etc). But then again, maybe this is not the sought after direction.

If you want, I can remove the dependancy on Google test I had previously inserted in the repo once this PR is merged.

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