We test whether a given solution of a quadratic 0-1 problem is optimal. The
paper presents an algorithm based on the necessary and sufficient optimali
ty condition introduced by Hirriart-Urruty for general convex problems. A m
easure of the quality of the solution is provided. Computational results sh
ow the applicability of the method.