calc and return test result