-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add ability to do case insensitive string compare #28
Comments
Can you do a pull on the 'develop' branch and test out assertStringCaseEqual() and assertStringCaseNotEqual()? I added unit tests for them, but it's possible that I missed something. |
Dude, you're awesome! Thank you. I will pull this ASAP and check it out. |
You need a tip jar. :) If you are into the cryptocurrency world, then check out ARK. Here is a way to get some free ARK for being a new member of the community. https://docs.google.com/forms/d/e/1FAIpQLSfkMygnSnSIwRH08H1j1VdZYmp8_zJsYLvRgLYJppgYFQCrzQ/viewform I can see about getting you a little more for helping out the project. |
Was able to at least verify it compiles for my use case. Won't be able to test on hardware until tomorrow. Looks great. |
Thanks for the pointer to Ark. Is that what you are using AUnit for? I'll check it out (...though I don't follow cryptocurrencies that much). I'll spin up a new AUnit release in the meantime. I'm curious about your Google Test adapter. If you think it's useful for other people, you could store it in this repo. |
Yup, we are using it for our C++ wrapper. Here is our project: https://github.com/Ark-IoT/Ark-Cpp Here is a link to the GTest wrapper (such as it is). It is not complete but you are welcome to copy/use/integrate it into your stuff. https://github.com/ciband/Ark-Cpp/blob/feature/generate_private_key/test/IoT/gtest/gtest.h I can also PR it to you if you like but I don't know what kind of organization / interface you would like. If you do then I'll delete my copy and just use your's. Thanks again for the extra features. |
This issue can be closed. Tested the 0.5.3 release and the new functions appear to work well. The GTest adapter can be tracked in #30. |
Excellent, thanks for verifying. |
I am using AUnit with a GTest interface wrapper to allow my unit tests to run on desktop OS as well as Arduino. I have the following adapter:
#include <AUnit.h>
#define TEST(category, name) test(category##__##name)
#define ASSERT_EQ(e, a) assertEqual(static_cast<decltype(a)>(e), a)
#define ASSERT_NE(e, a) assertNotEqual(static_cast<decltype(a)>(e), a)
#define ASSERT_STREQ(e, a) assertEqual(static_cast<decltype(a)>(e), a)
#define ASSERT_STRNE(e, a) assertNotEqual(static_cast<decltype(a)>(e), a)
#define ASSERT_STRCASEEQ(e, a) // ??
#define ASSERT_STRCASENE(e, a) // ??
#define ASSERT_TRUE(x) assertNotEqual(static_cast(x), 0u)
#define ASSERT_FALSE(x) assertEqual(static_cast(x), 0u)
It would be nice to have an easy way to do a case insensitive string compare similar to what GTest does. If the framework can already do this then a point in the right direction is appreciated.
Thanks for the wonderful framework.
The text was updated successfully, but these errors were encountered: