sorry one more question: assert statements in tests

Reece Dunn msclrhd at
Sat Jul 10 01:40:00 CDT 2010

On 10 July 2010 03:40, Misha Koshelev <misha680 at> wrote:
> I am implementing my tests as follows:
> * patch 1: general test for a D3DX function (D3DXCreateBox for example,
> testing specific vertices and indices for _specific_ dimensions).
> * patch 2: separate into function that works with arbitrary dimensions
> for the box, etc. I restrict to the dimensions from patch 1 using assert
> statements.
> * patch 3: expand to allow arbitrary parameters to the function, e.g.,
> arbitrary dimensions, removing the assert statements.
> For example, see
> patch 2 =
> patch 3 =
> Is assert the right way to do this? If not, what is?

Assert should be avoided in the tests.

If the assert fails, you will see that the test crashed -- especially
when the results are on This makes it difficult to
track what went wrong.

You should use an ok or skip/win_skip message so that information gets
logged and people looking at the failure can see what failed.

- Reece

More information about the wine-devel mailing list