Re: dlls/oleaut32: add tests for OleLoadPictureFile(Ex)

2008-11-19 Thread Jeremy Drake
On Tue, 18 Nov 2008, Michael Karcher wrote:

 Looks OK to me, but what happened to your finding about
 INET_E_RESOURCE_NOT_FOUND? Was it a red herring?

I saw that on XP, but I couldn't reproduce it on Windows 2000.  I need to
investigate this further.  Is there a mechansim to do
windows-version-specific tests?

  I ended up having to add OleLoadPicutreFile and OleLoadPictureFileEx to
  the .spec and .c files as actual functions (for now just returning
  E_NOTIMPL) in order to get the test to even compile.
 Might be that they don't appear in the ELF export table otherwise, and
 as we don't crossbuild the tests, the imports are done by the ELF
 linker/loader. BTW: In general, if you add stubs like this, please add a
 FIXME call showing the parameters and saying stub.

How do I show the VARIANT in the FIXME call?

 This fragment repeats over and over, sometimes with PICTYPE_BITMAP
 instead. Might be worth refactoring that into a function. todo_wine
 works for function boundaries. If you refactor, you should pass that
 function __LINE__ information and print it in your OK calls to know
 which of the tests is failing if something fails.

 You do a lot of tests like this. Setting disp to (void*)0xdeadbeef
 instead before allows you to differentiate between disp unmodified and
 disp explicitly set to zero.

Good ideas.  I'll do that.







Re: dlls/oleaut32: add tests for OleLoadPictureFile(Ex)

2008-11-18 Thread Michael Karcher
Am Dienstag, den 18.11.2008, 08:51 -0800 schrieb Jeremy Drake:
 On Tue, 18 Nov 2008, Michael Karcher wrote:
 
  Looks OK to me, but what happened to your finding about
  INET_E_RESOURCE_NOT_FOUND? Was it a red herring?
 I saw that on XP, but I couldn't reproduce it on Windows 2000.  I need to
 investigate this further.  Is there a mechansim to do
 windows-version-specific tests?
We don't care about what version returns which error codes. We treat
both as OK. Relying on windows versions is not a good idea, as
installing Microsoft office in some cases installs a much newer set of
OLE libraries than provided with the operating system. So Windows 2000 +
Office 2003 could very well show the behaviour you observed on Windows
XP. If (I don't think that's the case here) we deem one of the error
codes as inappropriate, that error code gets marked as broken like this:
  ok(res == INET_E_RESOURCE_NOT_FOUND || broken(res == CTL_E_FILENOTFOUND, res 
%08x\n, res)


  FIXME call showing the parameters and saying stub.
 How do I show the VARIANT in the FIXME call?
Just show the V_VT field. I think there is no debugstr_variant, although
I would find that quite useful. I thought about submitting one.

Regards,
  Michael Karcher