On 19/09/06, Dean Zobec <[EMAIL PROTECTED]> wrote:
Sent.
Thanks Dean!
I'm finishing the pending additions to fpcunit, then I'll take a look at
your fpgui, and see how can I help you on your project, I really
appreciate your work and your idea for the controls that depend only on
X server in lazarus.
Excellent.. I will be submitting my test timing patch tomorrow. I
had to rework a few things for Text Test runner a bit, but all working
now.
While we are on the topic...
How do I query if a Result Writer class is registered as a Listener in
a test result object. I reworked the code, because I couldn't get
this working, but thought I would ask anyway.
On line 99 in xmlreportwriter.pas I wanted to wrap the code block in a
if statement that looked like this, but the if statement always
returned False for some reason.
Maybe some background information on what I was do at the time. The
Result Writers could be used in two ways. Register as a Listener or
via the global methods, as was done in testreport.pp (function
TestResultAsXML(aTestResult: TTestResult): string;).
The function didn't method of doing things didn't include the runned
test nodes, but if you register it as a Listner, it did. So at one
stage I used both methods to collect all the data I needed for the
timing results, but then any errors that occured, got written twice.
Hence the reason I wanted to surpress that 2nd processing using the If
statement.
Again, I got it working by doing something else, but still couldn't
figure out what is wrong with my If statement. Could it have
something to do with the fact that Interfaces are involved? I know
very little about Interface, but are planning to rectify this soon.
:-)
pTestResult.Listeners is a TFPList. What is the difference between it an TList?
if pTestResult.Listeners.IndexOf(self) <> -1 then
begin
if pTestResult.NumberOfErrors <> 0 then
begin
for i := 0 to pTestResult.Errors.Count - 1 do
AddError(nil, TTestFailure(pTestResult.Errors.Items[i]));
end;
if pTestResult.NumberOfFailures <> 0 then
begin
for i := 0 to pTestResult.Failures.Count - 1 do
AddFailure(nil, TTestFailure(pTestResult.Failures.Items[i]));
end;
end;
Regards,
- Graeme -
--
There's no place like 127.0.0.1
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives