error tests for procedures and functions