def test_is_normal_compile(self): self.assertTrue(check_cfc.is_normal_compile( ['clang', '-c', 'test.cpp', '-o', 'test2.o'])) self.assertTrue( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp'])) # Outputting bitcode is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '-flto'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '-emit-llvm'])) # Outputting preprocessed output or assembly is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-E', 'test.cpp', '-o', 'test.ii'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-S', 'test.cpp', '-o', 'test.s'])) # Input of preprocessed or assembly is not a "normal compile" self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.s', '-o', 'test.o'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.ii', '-o', 'test.o'])) # Specifying --version and -c is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--version'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--help']))
def test_is_normal_compile(self): self.assertTrue( check_cfc.is_normal_compile( ['clang', '-c', 'test.cpp', '-o', 'test2.o'])) self.assertTrue( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp'])) # Outputting bitcode is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '-flto'])) self.assertFalse( check_cfc.is_normal_compile( ['clang', '-c', 'test.cpp', '-emit-llvm'])) # Outputting preprocessed output or assembly is not a normal compile self.assertFalse( check_cfc.is_normal_compile( ['clang', '-E', 'test.cpp', '-o', 'test.ii'])) self.assertFalse( check_cfc.is_normal_compile( ['clang', '-S', 'test.cpp', '-o', 'test.s'])) # Input of preprocessed or assembly is not a "normal compile" self.assertFalse( check_cfc.is_normal_compile( ['clang', '-c', 'test.s', '-o', 'test.o'])) self.assertFalse( check_cfc.is_normal_compile( ['clang', '-c', 'test.ii', '-o', 'test.o'])) # Specifying --version and -c is not a normal compile self.assertFalse( check_cfc.is_normal_compile( ['clang', '-c', 'test.cpp', '--version'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--help']))
def test_is_normal_compile(self): self.assertTrue(check_cfc.is_normal_compile( ['clang', '-c', 'test.cpp', '-o', 'test2.o'])) self.assertTrue( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp'])) # Outputting bitcode is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '-flto'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '-emit-llvm'])) # Outputting preprocessed output or assembly is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-E', 'test.cpp', '-o', 'test.ii'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-S', 'test.cpp', '-o', 'test.s'])) # Input of preprocessed or assembly is not a "normal compile" self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.s', '-o', 'test.o'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.ii', '-o', 'test.o'])) # Specifying --version and -c is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--version'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--help'])) # Outputting dependency files is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', '-M', 'test.cpp'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', '-MM', 'test.cpp'])) # Creating a dependency file as a side effect still outputs an object file self.assertTrue( check_cfc.is_normal_compile(['clang', '-c', '-MD', 'test.cpp'])) self.assertTrue( check_cfc.is_normal_compile(['clang', '-c', '-MMD', 'test.cpp']))
def test_is_normal_compile(self): self.assertTrue( check_cfc.is_normal_compile( ['clang', '-c', 'test.cpp', '-o', 'test2.o'])) self.assertTrue( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp'])) # Outputting bitcode is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '-flto'])) self.assertFalse( check_cfc.is_normal_compile( ['clang', '-c', 'test.cpp', '-emit-llvm'])) # Outputting preprocessed output or assembly is not a normal compile self.assertFalse( check_cfc.is_normal_compile( ['clang', '-E', 'test.cpp', '-o', 'test.ii'])) self.assertFalse( check_cfc.is_normal_compile( ['clang', '-S', 'test.cpp', '-o', 'test.s'])) # Input of preprocessed or assembly is not a "normal compile" self.assertFalse( check_cfc.is_normal_compile( ['clang', '-c', 'test.s', '-o', 'test.o'])) self.assertFalse( check_cfc.is_normal_compile( ['clang', '-c', 'test.ii', '-o', 'test.o'])) # Specifying --version and -c is not a normal compile self.assertFalse( check_cfc.is_normal_compile( ['clang', '-c', 'test.cpp', '--version'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--help'])) # Outputting dependency files is not a normal compile self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', '-M', 'test.cpp'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', '-MM', 'test.cpp'])) # Creating a dependency file as a side effect still outputs an object file self.assertTrue( check_cfc.is_normal_compile(['clang', '-c', '-MD', 'test.cpp'])) self.assertTrue( check_cfc.is_normal_compile(['clang', '-c', '-MMD', 'test.cpp']))