-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2014-11-28 11:35, schrieb Joachim Priesner:
Yes, this is mostly derived from MessageBoxW.
I'll try to make this more consistent and add more tests as far as it is possible. What would work better IMHO is splitting them up in multiple steps to build the new dialog step by step, each step accompanied with tests. E.g. start with testing handling of invalid input like pTaskConfig == NULL. Next, replace the current stub with its own dialog with equal functionality. After that, add support for the icon. And so on.
The way I've added additional tests to test_negative_fixedfunction_fog is an example of what I mean. (I have not done the same with the implementation because unconditionally adding the abs and then removing it again for pretransformed geometry would have introduced a temporary regression.)
Also the defines like TD_WARNING_ICON look like they're copypasted from Microsoft's header. What would be the way to define them properly? This topic has come up on this list before. Unfortunately I couldn't find a good answer in the archives with a quick Google search :-(
The rough answer: Add things exactly when you need them (or with a dedicated header changing patch right before that). Usually our headers deliberately use a different code style than Microsoft's headers to show that they are not copypasted. The header has to be compatible from a compiler point of view, but depending on what you define you have some freedom to write it down in a different way. With simple #defines that freedom is limited though. The facts recorded in the header are not copyrightable. The specific incarnation of the header may be copyrightable though, so we're really careful here. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJUe1/lAAoJEN0/YqbEcdMwKS0P/3VifCpni+l3QV8CySis+Hwp DZQ3K07AbfiL+YN5jt1cPua93arczUUa7MakO4ff7x7QPjhZ2PZ1hlmYdBjGk9qH GvEX1favCWTsRIURP3e8EJ1/Iet0BiYEj9+NWKQ62t8L/zV/iosoBVRg+iGEj3cX PTVaX5EAMdOkPiU124otEamtg8RGVmTaC/KixqlWdXEPtiNqu1scC0LFTh/4x0nk QHedD+CCrqIN6at8bl45gbUQma45UJ5sbaC81xaPM3DGp5WPhuN22CdofkI4iwfN 2lqFzG2+8vQ2f7p49L1QTDqX/C3CqIkPvPQAQylDd2SnKW7bvZClTv+UV5slom+T Cg5h9IwkjSe/cVLjW2MaQfWeX/W/QsHq8Len80cFQ592hKydARUcXl9Gr9iw95kb j6RsA/fFHJLltll0/OLC2m9byZztyCieaGfIzbxO3TDA0QcPycvb3zCPbuFO3nlc 9psCCpsLHZaxV/Y6SC655oNWk5jF+IWUytVcANFR29g0cU3C+icEVU6u2YEGmONK S81keqtX/lNWl5+IaxYXNT48/TPD0CwJP7UGyciDpA0VDJgcVu4cP3U5tfODmGg7 wV8TiDTW8sF70zm+7xXLLo9RrpCXmK/iN28Itg4moq8i6QrwAPQzAe/gDISHjHAh Q+aXkgmzn04EvIF9pLHK =QwHI -----END PGP SIGNATURE-----