TESTING FOR A GENERAL CLASS OF FUNCTIONAL INEQUALITIES