Giter Site home page Giter Site logo

TEST_STRING_EQUAL method about acutest HOT 2 CLOSED

mity avatar mity commented on May 18, 2024
TEST_STRING_EQUAL method

from acutest.

Comments (2)

mity avatar mity commented on May 18, 2024 2

One of the original motivations for Acutest was my dislike of baroque interfaces in existing solutions which provide a comparison macro for every combination of type and comparison operator and sometime even for some other aspect of the test (e.g. assert-like versus check-like behavior).

See e.g. https://github.com/ThrowTheSwitch/Unity/blob/ae8b98e80b716eb6c627f1c98261ffe9f9d3acca/src/unity.h#L124 for an example what I mean.

To clarify: that's not meant as an objective criticism, it's just a matter of my subjective taste.

I am willing to make some concessions where there is a wide consensus that the potential benefit outweighs the purity of the interface (and the string comparison might perhaps be that case).

But let me state clearly that I don't want to end up with the dozens of comparison macros like in the linked example.

And actually even here I am wondering whether you are proposing just the one macro, or implicitly also TEST_STRING_NOT_EQUAL, TEST_STRING_LOWER_THAN, TEST_STRING_EQUAL_OR_LOWER_THAN etc. and then ditto for case insensitive comparison and then....

from acutest.

gahr avatar gahr commented on May 18, 2024

In NeoMutt we have this:

https://github.com/neomutt/neomutt/blob/9222c6019c7fa3839008e9c6931666b8c81464de/test/address/common.h#L32-L40

from acutest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.