def test_compilation_error_fails(self): source = """int main(int, char**) { this does not compile }""" self.assertFalse(dsl.sourceBuilds(self.config, source))
def test_link_error_fails(self): source = """extern void this_isnt_defined_anywhere(); int main(int, char**) { this_isnt_defined_anywhere(); return 0; }""" self.assertFalse(dsl.sourceBuilds(self.config, source))
def test_valid_program_builds(self): source = """int main(int, char**) { return 0; }""" self.assertTrue(dsl.sourceBuilds(self.config, source))