When testing a sanitizing function I loaded a STRING(255) with a string of length 255. When that string fails to be equal I'll get the test marked as failed, but the PLC log doesn't highlight the error. (See attached screen shot)
I'd expect to have a FAILED TEST log message for that test.
I presume it is because comparing two strings of length 255 breaks the messaging system.
METHOD T001_Parametrize VAR_INPUT sTestName : STRING(255); val : STRING(255); expected : STRING(255); END_VAR VAR result : STRING(255); END_VAR TEST(sTestName); result := TMT.Sanitize(val); AssertEquals_STRING(expected, result, 'unexpected sanitize result'); TEST_FINISHED();
T001_Parametrize('T001_Parameterize:nothing to do', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis lectus nisi, id suscipit felis porta sit amet. Sed tincidunt pharetra velit vitae molestie. Fusce auctor ornare posuere. Class aptent taciti sociosqu ad litora torquent per conubia id.', '/orem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis lectus nisi, id suscipit felis porta sit amet. Sed tincidunt pharetra velit vitae molestie. Fusce auctor ornare posuere. Class aptent taciti sociosqu ad litora torquent per conubia id.'); T001_Parametrize(sTestName:='T001_Parametrize:quote_hello', '$'hello, world!$'', '$'$'hello, world!$'$'x');
Hi John,
Thank you for the feedback.
We will check into this and will use your code verify it.
To be continued...
Ignore my previous message. In the meanwhile I confirmed the real issue, now searching for root cause