def write_c(self): c = '\n'.join( ('#include <stdio.h>', 'static int t = 1;' 'int main()', '{', 'if (t)', 'printf("on this line\\n");', 'else', 'printf("but not here\\n");', 'return 0;', '}')) with open(os.path.join(os.path.dirname(__file__), '../hello.c'), 'w+') as f: f.write(c) codecov.try_to_run('clang -coverage -O0 hello.c -o hello && ./hello')
def write_c(self): c = '\n'.join(('#include <stdio.h>', 'static int t = 1;' 'int main()', '{', 'if (t)', 'printf("on this line\\n");', 'else', 'printf("but not here\\n");', 'return 0;', '}')) with open(os.path.join(os.path.dirname(__file__), '../hello.c'), 'w+') as f: f.write(c) codecov.try_to_run('clang -coverage -O0 hello.c -o hello && ./hello')
def write_c(self): c = "\n".join( ( "#include <stdio.h>", "static int t = 1;" "int main()", "{", "if (t)", 'printf("on this line\\n");', "else", 'printf("but not here\\n");', "return 0;", "}", ) ) with open(os.path.join(os.path.dirname(__file__), "../hello.c"), "w+") as f: f.write(c) codecov.try_to_run("clang -coverage -O0 hello.c -o hello && ./hello")
def write_c(self): c = "\n".join( ( "#include <stdio.h>", "static int t = 1;" "int main()", "{", "if (t)", 'printf("on this line\\n");', "else", 'printf("but not here\\n");', "return 0;", "}", ) ) with open(os.path.join(os.path.dirname(__file__), "../hello.c"), "w+") as f: f.write(c) codecov.try_to_run( ["clang", "-coverage", "-O0", "hello.c", "-o", "hello", "&&", "./hello"] )