Defect relating to how Assert:IsTrue evaluates the unknown v

Posted by beefhealy on 02-Aug-2019 14:35

Hi folks,

Any ideas on when the fix for this issue will be available? One of our developers came across this yesterday when a test was passing when it shouldn't have been. We place a lot of trust in our unit tests so this was a bit of a kick in the teeth for us. [:(]

There is a knowledge base entry but it doesn't provide any version information. We are running on Win32/Linux64 11.7.

I'd rather not have to refactor 1000+ tests to implement the workaround if it can be helped...

https://knowledgebase.progress.com/articles/Article/Assert-not-throwing-expected-fail-on-logical-variable-when-value-is-unknown

Thanks!

Posted by Matt Baker on 02-Aug-2019 22:37

The fix will be available in 11.7.6 and 12.2.

All Replies

Posted by Brian K. Maher on 02-Aug-2019 14:44

This workaround is in the bug report...
 
Workaround is:
Use the overloaded Assert methods -
IsTrue (logical, character)
IsFalse (logical, character)
IsUnknown (logical, character)
i.e.
using OpenEdge.Core.Assert.
define variable lVar as logical no-undo initial ?.
// Uncomment each method in turn and run the procedure.
//Assert:IsTrue(lVar, "IsTrue"). //isTrue is not true
//Assert:IsFalse(lVar, "IsFalse"). //IsFalse is not false
//Assert:IsUnknown(lVar, "IsUnknown"). //Succeeds.
 
 
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
781-280-3075
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by Matt Baker on 02-Aug-2019 22:37

The fix will be available in 11.7.6 and 12.2.

Posted by beefhealy on 06-Aug-2019 15:50

Thanks Brian, but as mentioned in the original post it would require a significant time investment to go back over 1000+ tests to implement the work around. I'll sit tight and wait for the fix.

Posted by Matt Baker on 06-Aug-2019 20:06

Your other option is to copy and fix the Assert class and add it to your PROPATH with a until such time as a new OpenEdge version is available.

11.7.5 source is here:

community.progress.com/.../3474.ade-openedge-11-7-5-development-tools-source-code

12.0 source is here:

community.progress.com/.../3418.ade-openedge-12-0-development-tools-source-code

This thread is closed