Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/mesh.c:
+{
- ID3DXLoadUserData iface;
- unsigned int data_count;
- struct test_user_data data[MAX_USER_DATA_COUNT];
+};
+static void record_common_user_data(struct test_load_user_data *data, ID3DXFileData *filedata,
enum user_data_type data_type)
+{
- struct test_user_data *d = &data->data[data->data_count];
- const void *ptr;
- HRESULT hr;
- SIZE_T sz;
- ok(data->data_count < MAX_USER_DATA_COUNT, "got %u.\n", data->data_count);
Isn't this checking that the test doesn't exceed its own upper limit? It doesn't seem like it should be an ok(); maybe an assert?