@ -224,22 +224,23 @@ class InternalTests(unittest.TestCase):
def test_compiler_args_class_visualstudio ( self ) :
linker = mesonbuild . linkers . MSVCDynamicLinker ( MachineChoice . HOST , [ ] )
cc = VisualStudioCPPCompiler ( [ ] , [ ] , ' fake ' , MachineChoice . HOST , False , mock . Mock ( ) , ' x64 ' , linker = linker )
# Version just needs to be > 19.0.0
cc = VisualStudioCPPCompiler ( [ ] , [ ] , ' 20.00 ' , MachineChoice . HOST , False , mock . Mock ( ) , ' x64 ' , linker = linker )
a = cc . compiler_args ( cc . get_always_args ( ) )
self . assertEqual ( a . to_native ( copy = True ) , [ ' /nologo ' , ' /showIncludes ' , ' /utf-8 ' ] )
self . assertEqual ( a . to_native ( copy = True ) , [ ' /nologo ' , ' /showIncludes ' , ' /utf-8 ' , ' /Zc:__cplusplus ' ] )
# Ensure /source-charset: removes /utf-8
a . append ( ' /source-charset:utf-8 ' )
self . assertEqual ( a . to_native ( copy = True ) , [ ' /nologo ' , ' /showIncludes ' , ' /source-charset:utf-8 ' ] )
self . assertEqual ( a . to_native ( copy = True ) , [ ' /nologo ' , ' /showIncludes ' , ' /Zc:__cplusplus ' , ' / source-charset:utf-8 ' ] )
# Ensure /execution-charset: removes /utf-8
a = cc . compiler_args ( cc . get_always_args ( ) + [ ' /execution-charset:utf-8 ' ] )
self . assertEqual ( a . to_native ( copy = True ) , [ ' /nologo ' , ' /showIncludes ' , ' /execution-charset:utf-8 ' ] )
self . assertEqual ( a . to_native ( copy = True ) , [ ' /nologo ' , ' /showIncludes ' , ' /Zc:__cplusplus ' , ' / execution-charset:utf-8 ' ] )
# Ensure /validate-charset- removes /utf-8
a = cc . compiler_args ( cc . get_always_args ( ) + [ ' /validate-charset- ' ] )
self . assertEqual ( a . to_native ( copy = True ) , [ ' /nologo ' , ' /showIncludes ' , ' /validate-charset- ' ] )
self . assertEqual ( a . to_native ( copy = True ) , [ ' /nologo ' , ' /showIncludes ' , ' /Zc:__cplusplus ' , ' / validate-charset- ' ] )
def test_compiler_args_class_gnuld ( self ) :