summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testprogs/win32/spoolss/spoolss.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c
index 97bf5eb1fc..7417b7f321 100644
--- a/testprogs/win32/spoolss/spoolss.c
+++ b/testprogs/win32/spoolss/spoolss.c
@@ -1424,22 +1424,26 @@ static BOOL test_PrinterData(struct torture_context *tctx,
torture_comment(tctx, "Testing PrinterData (type: %s, size: 0x%08x)", reg_type_str(type), size);
- ret &= test_SetPrinterDataEx(tctx, printername, keyname, valuename, handle, type, buffer, size);
- ret &= test_GetPrinterDataEx(tctx, printername, keyname, valuename, handle, &type_ex, &buffer_ex, &size_ex);
- if (ret == TRUE) {
- if (!PrinterDataEqual(tctx, type_ex, type, size_ex, size, buffer_ex, buffer)) {
- torture_warning(tctx, "GetPrinterDataEx does not return the same info as we set with SetPrinterDataEx");
- ret = FALSE;
- }
+ torture_assert(tctx,
+ test_SetPrinterDataEx(tctx, printername, keyname, valuename, handle, type, buffer, size),
+ "failed to call SetPrinterDataEx");
+ torture_assert(tctx,
+ test_GetPrinterDataEx(tctx, printername, keyname, valuename, handle, &type_ex, &buffer_ex, &size_ex),
+ "failed to call GetPrinterDataEx");
+
+ if (!PrinterDataEqual(tctx, type_ex, type, size_ex, size, buffer_ex, buffer)) {
+ torture_warning(tctx, "GetPrinterDataEx does not return the same info as we set with SetPrinterDataEx");
+ ret = FALSE;
}
ret &= test_DeletePrinterDataEx(tctx, printername, keyname, valuename, handle);
ret &= test_DeletePrinterKey(tctx, printername, keyname, handle);
free(buffer);
+ free(buffer_ex);
}
}
- return TRUE;
+ return ret;
}
/****************************************************************************