-----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.