We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Possible bug, do we need to check the length of the two strings during the comparison
Example of the problem.
Validation String: "ABC" Input String: "ABCDEF"
I think this will pass as the Validation String == Input String, when actually it should fail.
/**! Asserts that a string KVP field matches the expected value. */ #define UT_ASSERT_KVP_EQUAL_PROFILE_STRING(checkValue, key) \ { \ char result_kvp[UT_KVP_MAX_ELEMENT_SIZE]={0}; \ ut_kvp_status_t status; \ status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key, result_kvp, UT_KVP_MAX_ELEMENT_SIZE); \ UT_ASSERT( status == UT_KVP_STATUS_SUCCESS ); \ if ( status == UT_KVP_STATUS_SUCCESS ) \ { \ UT_ASSERT_STRING_EQUAL(checkValue, result_kvp); \ } \ else \ { \ UT_ASSERT(true);\ } \ }
Code that performs the validation is here, we may need to upgrade all the string macros to validate better
#define UT_ASSERT_STRING_EQUAL(expected, actual) \ { \ const char *_expected = (const char *)(expected); \ const char *_actual = (const char *)(actual); \ const int _result = strcmp(_actual, _expected); \ if (_result) \ { \ UT_LOG_ASSERT(UT_ASSERT_STRING_EQUAL, #actual, #expected); \ } \ CU_ASSERT_STRING_EQUAL(_actual, _expected); \ }
The text was updated successfully, but these errors were encountered:
kanjoe24
No branches or pull requests
Possible bug, do we need to check the length of the two strings during the comparison
Example of the problem.
Validation String: "ABC"
Input String: "ABCDEF"
I think this will pass as the Validation String == Input String, when actually it should fail.
Code that performs the validation is here, we may need to upgrade all the string macros to validate better
The text was updated successfully, but these errors were encountered: