tests: ok(0,"foo") prints a '\n'!

Francois Gouget fgouget at free.fr
Fri Dec 27 21:18:14 CST 2002


I noticed that the oleaut32/safearray test uses statements such as:

   ok(a->cDims == i,"a->cDims not initialised?\n");

But it is not necessary to add a '\n' to ok statements. All it does is
insert an extra '\n' after each test error.

I could send a patch to fix this (small) issue, but I think this
behavior of 'ok' is wrong. It goes against the convention established by
all other functions such as printf, TRACE, ERR and even the test
framework's own trace function. None of these appends a '\n'. 'ok' is
the exception there and safearray is not the first test (nor the last)
to get caught by this.

So if noone objects I'll send a patch that stops 'ok' from appending
this '\n', and adds a '\n' to all calls to ok. Actually, I would be
pretty happy if someone could come up with a perl script doing the
latter...

Comments?


-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                              145 = 1! + 4! + 5!




More information about the wine-devel mailing list