From: <bi...@us...> - 2009-08-06 15:37:07
|
Revision: 5059 http://oorexx.svn.sourceforge.net/oorexx/?rev=5059&view=rev Author: bigrixx Date: 2009-08-06 15:36:59 +0000 (Thu, 06 Aug 2009) Log Message: ----------- Change method used to determine failure line numbers Modified Paths: -------------- test/trunk/framework/OOREXXUNIT.CLS Modified: test/trunk/framework/OOREXXUNIT.CLS =================================================================== --- test/trunk/framework/OOREXXUNIT.CLS 2009-08-06 15:36:27 UTC (rev 5058) +++ test/trunk/framework/OOREXXUNIT.CLS 2009-08-06 15:36:59 UTC (rev 5059) @@ -1046,9 +1046,34 @@ expose lineNumber conditionObject if lineNumber \== .nil then return lineNumber - else return conditionObjLineNumber(conditionObject) + else return self~conditionObjLineNumber +/** conditionObjLineNumber() + * Given an object, will return the line number of a syntax exception, if the + * object is a condition object for a syntax exception. Othewise returns -1. + */ +::method conditionObjLineNumber + expose conditionObject testName + lineNumber = -1 + + if isConditionObj(conditionObject) then do + if conditionObject~stackFrames~isA(.list) then do + do frame over conditionObject~stackFrames + if frame~name~caselessEquals(testName) then do + return frame~line + end + end + return -1 + end + else if conditionObject~condition == "SYNTAX" then do + lineNumber = conditionObject~position + end + end + + return lineNumber + + /* class: AssertFailure- - - - - - - - - - - - - - - - - - - - - - - - - - - -*\ AssertFailure is a report of a test case failure. A test case fails when an This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |