def test_flags_include_pch(self): p = self.Path('/path/to/header.hpp') self.assertEqual( self.compiler.flags( opts.option_list( opts.pch( file_types.MsvcPrecompiledHeader( p, p, 'header', 'native', 'c++')))), ['/Yuheader'])
def test_output_file(self): fmt = self.env.target_platform.object_format out = file_types.MsvcPrecompiledHeader( Path('hdr.pch'), Path('src.obj'), 'hdr.h', fmt, 'c++' ) self.assertEqual(self.compiler.output_file('hdr.h', AttrDict( pch_source=file_types.SourceFile(Path('src.c'), 'c') )), [out, out.object_file])