Exemple #1
0
 def test_compilation_error_fails(self):
     source = """int main(int, char**) { this does not compile }"""
     self.assertFalse(dsl.sourceBuilds(self.config, source))
Exemple #2
0
 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))
Exemple #3
0
 def test_valid_program_builds(self):
     source = """int main(int, char**) { return 0; }"""
     self.assertTrue(dsl.sourceBuilds(self.config, source))