def test_objc_detection(self) -> None:
        '''
        Test that when we can't detect objc or objcpp, we fail gracefully.
        '''
        env = get_fake_env()
        try:
            detect_objc_compiler(env, MachineChoice.HOST)
        except EnvironmentException as e:
            self.assertRegex(str(e), r"(Unknown compiler|GCC was not built with support)")
        else:
            raise unittest.SkipTest('Working objective-c Compiler found, cannot test error.')

        Test that when we can't detect objc or objcpp, we fail gracefully.
        
unittests/failuretests.py