
nZc           @   sc   d  Z  d d l Z d d l Z d d l j Z d e j f d     YZ e d k r_ e j   n  d S(   s(   Unit tests for the MSVSSettings.py file.iNt   TestSequenceFunctionsc           B   sb   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z RS(
   c         C   s   t  j    |  _ d  S(   N(   t   StringIOt   stderr(   t   self(    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt   setUp   s    c         C   sg   |  j  j d  |  j  j   j d  } g  | D] } | r/ | ^ q/ } |  j t |  t |   d S(   s-   Compares recorded lines to expected warnings.i    s   
N(   R   t   seekt   readt   splitt   assertEqualt   sorted(   R   t   expectedt   actualt   line(    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt   _ExpectedWarnings   s    c         C   sb   t  j i i  d 6i  d 6i  d 6i  d 6i  d 6i  d 6i  d 6i  d 6|  j  |  j d	 d
 g  d S(   s,   Tests that only MSVS tool names are allowed.t   VCCLCompilerToolt   VCLinkerToolt
   VCMIDLToolt   foot   VCResourceCompilerToolt   VCLibrarianToolt   VCManifestToolt	   ClCompiles   Warning: unrecognized tool foos$   Warning: unrecognized tool ClCompileN(   t   MSVSSettingst   ValidateMSVSSettingsR   R   (   R   (    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt#   testValidateMSVSSettings_tool_names   s    

c         C   s>  t  j i i@ d d 6d d g d 6d d 6d d 6d	 d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6d d! 6d" d# 6d d$ 6d d% 6d d& 6d d' 6d d( 6d d) 6d d* 6d+ d, 6d+ d- 6d d. 6d d/ 6d d0 6d d1 6d d2 6d d3 6d d4 6d d5 6d d6 6d d7 6d d8 6d d9 6d d: 6d d; 6d d< 6d d= 6d d> 6d d? 6d d@ 6d dA 6d dB 6d dC 6d dD 6d dE 6d dF 6d dG 6d dH 6d dI 6d dJ 6d dK 6d dL 6d dM 6d" dN 6dO 6iN d+ dP 6dQ dR 6d dS 6d+ dT 6dU d 6d+ dV 6d dW 6d dX 6d+ dY 6dU dZ 6d d[ 6d d\ 6d d] 6d d^ 6d+ d_ 6d d` 6d da 6d+ db 6d dc 6d dd 6dU de 6d d$ 6d df 6d+ dg 6d dh 6d di 6d dj 6d dk 6dU dl 6dU dm 6d dn 6d+ do 6d dp 6d dq 6d dr 6d ds 6d dt 6d du 6d dv 6d dw 6d dx 6d dy 6d dz 6d d{ 6d d| 6dU d} 6d d~ 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6dU d 6dU d 6d d 6d d 6d d 6d dC 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d dI 6dU d 6d 6i d d 6dU d 6dU d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d0 6d d 6d d 6d" d 6dU d 6d d; 6d d 6d d 6d dB 6d dC 6d d 6d d 6d dF 6d d 6d dJ 6d dK 6d 6i
 dU d 6d d 6d d 6d d0 6d" d 6d d; 6dU d 6d d 6d dC 6d dF 6d 6i d+ dP 6d dS 6dU d 6d d 6dU dg 6d dn 6d+ d 6d dw 6d d 6d d 6d dC 6d dI 6d 6i d+ d 6dU d 6dU d 6d d 6d d 6d d 6dU d 6d d 6d d 6d d 6d d 6d dC 6d d 6d d 6d d 6d d 6d dI 6d d 6d 6|  j  |  j d d d d d d d d d d g
  d S(   s%   Tests that for invalid MSVS settings.s   folder1;folder2t   AdditionalIncludeDirectoriest   string1t   string2t   AdditionalOptionst   AdditionalUsingDirectoriest   a_file_namet   AssemblerListingLocationt   0t   AssemblerOutputt   5t   BasicRuntimeCheckst   fdksljt   BrowseInformationt   BrowseInformationFilet   truet   BufferSecurityChecks   -1t   CallingConventiont   1t	   CompileAst   2t   DebugInformationFormatt   DefaultCharIsUnsignedt   Detect64BitPortabilityProblemst   DisableLanguageExtensionss   string1;string2t   DisableSpecificWarningst   EnableEnhancedInstructionSett   EnableFiberSafeOptimizationst   EnableFunctionLevelLinkingt   EnableIntrinsicFunctionst   EnablePREfastt   bogust   Enableprefastt   ErrorReportingt   ExceptionHandlingt   ExpandAttributedSourcet   FavorSizeOrSpeedt   FloatingPointExceptionst   FloatingPointModelt   ForceConformanceInForLoopScopes   file1;file2t   ForcedIncludeFilest   ForcedUsingFilest   GeneratePreprocessedFilet   GenerateXMLDocumentationFilest   IgnoreStandardIncludePatht   InlineFunctionExpansiont   KeepCommentst   MinimalRebuildt
   ObjectFilet   OmitDefaultLibNamet   OmitFramePointerst   OpenMPt   Optimizationt   PrecompiledHeaderFilet   PrecompiledHeaderThrought   PreprocessorDefinitionst   ProgramDataBaseFileNamet   RuntimeLibraryt   RuntimeTypeInfot   ShowIncludest   SmallerTypeCheckt   StringPoolingt   StructMemberAlignmentt   SuppressStartupBannert   TreatWChar_tAsBuiltInTypet"   UndefineAllPreprocessorDefinitionst   UndefinePreprocessorDefinitionst   UseFullPathst   UsePrecompiledHeadert   UseUnicodeResponseFilest   WarnAsErrort   WarningLevelt   WholeProgramOptimizationt   XMLDocumentationFileNamet   ZZXYZR   t   AdditionalDependenciest   file3t   AdditionalDependencies_excludedt   AdditionalLibraryDirectoriest   AdditionalManifestDependenciess	   a string1t   AddModuleNamesToAssemblyt   AllowIsolationt   AssemblyDebugt   AssemblyLinkResourcet   BaseAddresst   CLRImageTypet   CLRThreadAttributet   CLRUnmanagedCodeCheckt   DataExecutionPreventiont   DelayLoadDLLst	   DelaySignt   Drivert   EmbedManagedResourceFilet   EnableCOMDATFoldingt	   EnableUACt   EntryPointSymbolt   FixedBaseAddresst   ForceSymbolReferencest   FunctionOrdert   GenerateDebugInformationt   GenerateManifestt   GenerateMapFilet   HeapCommitSizet   HeapReserveSizet   IgnoreAllDefaultLibrariest   IgnoreDefaultLibraryNamest   IgnoreEmbeddedIDLt   IgnoreImportLibraryt   ImportLibraryt   KeyContainert   KeyFilet   LargeAddressAwaret   LinkIncrementalt   LinkLibraryDependenciest   LinkTimeCodeGenerationt   ManifestFilet
   MapExportst   MapFileNamet   MergedIDLBaseFileNamet   MergeSectionst   MidlCommandFilet   ModuleDefinitionFilet   OptimizeForWindows98t   OptimizeReferencest
   OutputFilet   PerUserRedirectiont   Profilet   ProfileGuidedDatabaset   ProgramDatabaseFilet   RandomizedBaseAddresst   RegisterOutputt   ResourceOnlyDLLt   SetChecksumt   ShowProgresst   StackCommitSizet   StackReserveSizet   StripPrivateSymbolst	   SubSystemt   SupportUnloadOfDelayLoadedDLLt   SwapRunFromCDt   SwapRunFromNett   TargetMachinet   TerminalServerAwaret   TurnOffAssemblyGenerationt   TypeLibraryFilet   33t   TypeLibraryResourceIDt   UACExecutionLevelt   UACUIAccesst   UseLibraryDependencyInputst   VersionR   t   CPreprocessOptionst   DefaultCharTypet   DLLDataFileNamet   EnableErrorCheckst   ErrorCheckAllocationst   ErrorCheckBoundst   ErrorCheckEnumRanget   ErrorCheckRefPointerst   ErrorCheckStubDatat   GenerateStublessProxiest   GenerateTypeLibraryt   HeaderFileNamet   InterfaceIdentifierFileNamet   MkTypLibCompatiblet   notgoodt   OutputDirectoryt   ProxyFileNamet   RedirectOutputAndErrorst   TargetEnvironmentt   TypeLibraryNamet   ValidateParametersR   t   1003t   Culturet   notgood2t   ResourceOutputFileNameR   t   ExportNamedFunctionst   IgnoreSpecificDefaultLibrariesR   t   AdditionalManifestFilest   AssemblyIdentityt   ComponentFileNamet   DependencyInformationFilet   GenerateCatalogFilest   InputResourceManifestst   ManifestResourceFilet   OutputManifestFilet   RegistrarScriptFilet   ReplacementsFilet   truelt   UpdateFileHashest   UpdateFileHashesSearchPatht   UseFAT32Workaroundt   VerboseOutputR   s^   Warning: for VCCLCompilerTool/BasicRuntimeChecks, index value (5) not in expected range [0, 4)sa   Warning: for VCCLCompilerTool/BrowseInformation, invalid literal for int() with base 10: 'fdkslj's^   Warning: for VCCLCompilerTool/CallingConvention, index value (-1) not in expected range [0, 4)sZ   Warning: for VCCLCompilerTool/DebugInformationFormat, converted value for 2 not specified.s<   Warning: unrecognized setting VCCLCompilerTool/Enableprefasts4   Warning: unrecognized setting VCCLCompilerTool/ZZXYZsM   Warning: for VCLinkerTool/TargetMachine, converted value for 2 not specified.s0   Warning: unrecognized setting VCMIDLTool/notgoods=   Warning: unrecognized setting VCResourceCompilerTool/notgood2sH   Warning: for VCManifestTool/UpdateFileHashes, expected bool; got 'truel'N(   R   R   R   R   (   R   (    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt!   testValidateMSVSSettings_settings*   s   
c         C   st  t  j i	 iG d d 6d d g d 6d d 6d d 6d	 d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6d d! 6d" d# 6d$ d% 6d& d' 6d d( 6d) d* 6d d+ 6d, d- 6d d. 6d/ d0 6d/ d1 6d d2 6d d3 6d d4 6d5 d6 6d d7 6d d8 6d d9 6d d: 6d d; 6d d< 6d d= 6d> d? 6d@ dA 6d dB 6d dC 6d dD 6d dE 6dF dG 6d dH 6d dI 6dJ dK 6d dL 6dM dN 6d dO 6d dP 6d dQ 6d dR 6dS dT 6d dU 6dV dW 6d dX 6d dY 6d dZ 6d d[ 6d d\ 6d d] 6d d^ 6d_ d` 6d da 6d db 6d" dc 6dd 6iU d/ de 6d df 6d/ dg 6dF d 6d/ dh 6d di 6dj dk 6d/ dl 6dF dm 6d d 6dn do 6dp dq 6dr ds 6d dt 6du dv 6d dw 6d/ dx 6d dy 6dz d{ 6d/ d| 6d d} 6d d~ 6dF d 6d d 6dp d 6d/ d 6d d 6d d 6d d 6dF d 6dF d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6dF d 6d d 6dF d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6dJ d 6d d 6d d 6dF d 6dF d 6dF d 6d d 6d d 6d d 6d d 6d dU 6d d 6d d 6d d 6d d 6dV dW 6d d 6d d 6d d 6dJ d 6d d 6d d 6dF d 6d 6i d d 6dF d 6d d 6d d4 6d d 6d dE 6dF d 6d d 6d dU 6dV dW 6d d\ 6d 6i& d d 6dF d 6d d 6d d 6dF d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d4 6d d 6dJ d 6d d 6dF d 6d dE 6d d 6d d 6d d 6dz dT 6d d 6d dU 6d d 6dV dW 6d d 6d d 6d d\ 6d d 6d d 6d d` 6d 6i d/ de 6d df 6dF d 6dF d 6d d% 6d d 6dF d 6d d 6d/ d 6d d 6dF d 6d d 6d d 6d d 6d/ d 6d d 6d dU 6d d 6dV dW 6d d 6d d 6d d 6d 6i d/ d 6dF d 6dF d 6d d 6d d 6d d 6d d 6dF d 6d d6d" d6d d6dF d6d d6d d6d d6d dU 6dV dW 6d d 6d d6d d	6d d
6d6i d d6d d6d6i d d 6d6i d d6d d6d d6d d6dj 6|  j  |  j ddddddg  dS(  s(   Tests that for invalid MSBuild settings.s   folder1;folder2R   R   R   R   R   R   R   t	   NoListingR!   t   StackFrameRuntimeCheckR#   t   falseR%   R&   R'   R(   t   BuildingInIDEt   CdeclR)   t
   CompileAsCR+   t   CompileAsManagedt   CreateHotpatchableImaget   ProgramDatabaseR-   R0   s   string1;string2R1   t   StreamingSIMDExtensionsR2   R3   R6   R7   R8   t   PromptR9   t
   SyncCThrowR:   R;   t   NeitherR<   R=   t   PreciseR>   R?   s   file1;file2R@   RA   t   FunctionLevelLinkingRC   RD   t   OnlyExplicitInlineRE   t   IntrinsicFunctionsRG   t   MultiProcessorCompilationt   ObjectFileNameRI   RJ   t   OpenMPSupportt   DisabledRL   t   NotUsingt   PrecompiledHeaderRM   t   PrecompiledHeaderOutputFilet   PreprocessKeepCommentsRO   s	   a string1t   PreprocessOutputPatht   PreprocessSuppressLineNumberst   PreprocessToFileR   t   ProcessorNumberRP   t   MultiThreadedRQ   RR   RS   RT   RU   t   1ByteRV   RW   t   a_foldert   TrackerLogDirectoryt   TreatSpecificWarningsAsErrorst   TreatWarningAsErrorRX   RY   RZ   R[   t   UseUnicodeForAssemblerListingt   TurnOffAllWarningsR_   R`   Ra   Rb   R   Rc   Rf   Rg   Rh   Ri   t    Rj   Rk   Rl   t   ForceIJWImageRm   t   Enabledt   CLRSupportLastErrort   MTAThreadingAttributeRn   Ro   t   X86Imaget   CreateHotPatchableImageRp   Rq   Rr   t   NotSetRs   Rt   Ru   Rv   Rw   Rx   t   ForceFileOutputRy   Rz   R{   R}   R~   R   R   R   t   a_file_listR   t   ImageHasSafeExceptionHandlersR   R   R   R   t   LinkDLLt   SendErrorReportt   LinkErrorReportingt
   LinkStatust   UseLinkTimeCodeGenerationR   R   R   R   R   R   R   t   MinimumRequiredVersionR   t   MSDOSStubFileNamet   NoEntryPointR   R   R   t   PreventDllBindingR   R   R   R   R   t   SectionAlignmentR   t   LinkVerboseREFR   t   SpecifySectionAttributesR   R   R   t   ConsoleR   t   SupportNobindOfDelayLoadedDLLR   R   t   SwapRunFromNETt
   MachineX86R   R   t   TreatLinkerWarningAsErrorsR   R   R   t	   AsInvokerR   R   R   t   Linkt   0x236R   t   NullTerminateStringsR   t   ResourceCompilet   ApplicationConfigurationModet   ClientStubFileR   t   SignedR   t   DllDataFileNamet   EnableCustomR   R   R   R   R   R   t   Stubt   GenerateClientFilest   Nonet   GenerateServerFilesR   R   R   R   t   LocaleIDR   R   R   R   t   ServerStubFilet   SuppressCompilerWarningst   ItaniumR   t	   NewFormatt   TypeLibFormatR   t   ValidateAllParametersR^   R*   t   Midlt   DisplayLibraryt   PromptImmediatelyR   t   Namet   RemoveObjectst   MachineX86it   TreatLibWarningAsErrorsR]   t   Verboset   LibR   R   R   t   falt   EnableDPIAwarenessR   R   t   GenerateCategoryTagsR   t   ManifestFromManagedAssemblyt   notgood3R   t   OutputResourceManifestsR   R   t   SuppressDependencyElementR   R   R   t   ManifestR   R   t   ProjectReferencet   ManifestResourceCompilet   EmbedManifestR|   R   R   s5   Warning: unrecognized setting ClCompile/Enableprefasts-   Warning: unrecognized setting ClCompile/ZZXYZs/   Warning: unrecognized setting Manifest/notgood3sF   Warning: for Manifest/GenerateCatalogFiles, expected bool; got 'truel'sI   Warning: for Lib/TargetMachine, unrecognized enumerated value MachineX86isB   Warning: for Manifest/EnableDPIAwareness, expected bool; got 'fal'N(   R   t   ValidateMSBuildSettingsR   R   (   R   (    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt$   testValidateMSBuildSettings_settings  s"   
c         C   sB   i  } i  } t  j | |  j  } |  j | |  |  j g   d S(   s   Tests an empty conversion.N(   R   t   ConvertToMSBuildSettingsR   R   R   (   R   t   msvs_settingst   expected_msbuild_settingst   actual_msbuild_settings(    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt"   testConvertToMSBuildSettings_empty1  s    c         C   s   i i d d 6d d 6d d 6d 6i d d	 6d d
 6d d 6d 6} i i d d 6d d 6d d 6d 6i d d	 6d d 6d d 6d 6} t  j | |  j  } |  j | |  |  j g   d S(   s   Tests a minimal conversion.t   dir1R   s   /fooR   R    R#   R   R*   R   R9   R,   Rp   R   t   DefaultR   R  R2  R  R'   R  N(   R   RF  R   R   R   (   R   RG  RH  RI  (    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt$   testConvertToMSBuildSettings_minimal;  s.    c      	   C   s   i i d d 6d d 6d d 6d d 6d	 d
 6d d 6d 6i d d 6d d 6d d 6d d 6d 6i d d 6d 6} i i d d 6d d 6d 6i  d 6i d d 6d 6} t  j | |  j  } |  j | |  |  j d d d d  d! d" d# d$ g  d% S(&   s)   Tests conversion that generates warnings.R*   R   R,   R   t   12R#   t   21R%   t   13R\   t   14RB   R   t   10Rs   t   31R   R9   t   6Rx   R   R   R   R   R   R  t   0x03ebR  sw   Warning: while converting VCCLCompilerTool/BasicRuntimeChecks to MSBuild, index value (12) not in expected range [0, 4)sv   Warning: while converting VCCLCompilerTool/BrowseInformation to MSBuild, index value (21) not in expected range [0, 3)sy   Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to MSBuild, index value (13) not in expected range [0, 3)sv   Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to MSBuild, value must be one of [0, 1, 2]; got 14sg   Warning: while converting VCLinkerTool/Driver to MSBuild, index value (10) not in expected range [0, 4)sw   Warning: while converting VCLinkerTool/LinkTimeCodeGeneration to MSBuild, index value (31) not in expected range [0, 5)so   Warning: while converting VCLinkerTool/ErrorReporting to MSBuild, index value (21) not in expected range [0, 3)sp   Warning: while converting VCLinkerTool/FixedBaseAddress to MSBuild, index value (6) not in expected range [0, 3)N(   R   RF  R   R   R   (   R   RG  RH  RI  (    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt%   testConvertToMSBuildSettings_warnings[  sF    c         C   s  i i> d d 6d d 6d d 6d d 6d d	 6d
 d 6d d 6d d 6d d 6d d 6d
 d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d
 d 6d d  6d d! 6d d" 6d d# 6d
 d$ 6d d% 6d& d' 6d& d( 6d
 d) 6d d* 6d d+ 6d d, 6d d- 6d d. 6d d/ 6d d0 6d d1 6d d2 6d3 d4 6d d5 6d d6 6d d7 6d d8 6d d9 6d d: 6d d; 6d d< 6d d= 6d
 d> 6d d? 6d d@ 6d dA 6d dB 6d dC 6d
 dD 6d dE 6d dF 6d dG 6d dH 6d dI 6dJ 6iN d& dK 6d dL 6d dM 6d& dN 6d d 6d& dO 6d dP 6d dQ 6d& dR 6d dS 6d
 dT 6d dU 6d dV 6d dW 6d& dX 6d dY 6d
 dZ 6d& d[ 6d d\ 6d d] 6d d^ 6d d 6d
 d_ 6d& d` 6d da 6d db 6d dc 6d dd 6d de 6d df 6d dg 6d& dh 6d di 6d dj 6d dk 6d dl 6d dm 6d dn 6d
 do 6d dp 6d dq 6d dr 6d ds 6d dt 6d du 6d dv 6d dw 6d dx 6d
 dy 6d dz 6d d{ 6d d| 6d d} 6d d~ 6d d 6d
 d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d? 6d d 6d d 6d3 d 6d d 6d d 6d d 6d d 6d
 d 6d d 6d d 6d dE 6d d 6d 6i	 d d 6d d 6d d 6d d+ 6d d7 6d d 6d d 6d d? 6d dB 6d 6i d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d+ 6d d 6d d 6d d 6d d7 6d d 6d d 6d3 d> 6d d? 6d
 d 6d d 6d dB 6d d 6d dF 6d dG 6d 6i d& dK 6d dL 6d dM 6d d 6d d 6d d` 6d dg 6d& d 6d dp 6d dx 6d d{ 6d d? 6d dE 6d 6i d& d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d? 6d d 6d d 6d d 6d d 6d dE 6d d 6d 6} i	 i< d d 6d d 6d d 6d d 6d d	 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6d d! 6d d" 6d d# 6d d$ 6d d% 6d& d' 6d& d( 6d d 6d d* 6d d+ 6d d, 6d d 6d d. 6d d 6d d0 6d d1 6d d 6d d4 6d d 6d d5 6d d 6d d 6d d7 6d d 6d d 6d d8 6d d9 6d d: 6d d; 6d d< 6d d= 6d d> 6d d? 6d d 6d d@ 6d dA 6d dB 6d dC 6d dG 6d dH 6d dI 6d 6iF d& dK 6d dL 6d& dN 6d d 6d& dO 6d dP 6d dQ 6d& dR 6d dS 6d dT 6d dU 6d dV 6d dW 6d& dX 6d dY 6dZ dZ 6d& d[ 6d d\ 6d d] 6d d^ 6d d_ 6d& d` 6d da 6d db 6d dd 6d de 6d df 6d dg 6d di 6d& d 6d dk 6d dl 6d dm 6d dn 6d d 6d dq 6d dr 6d ds 6d dt 6d du 6d dv 6d dw 6d dx 6d d 6d dz 6d d{ 6d d| 6d d} 6d d~ 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d? 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d 6i	 d d 6d d 6d d 6d d+ 6d d7 6d d 6d d 6d d? 6d dB 6d 6i d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d+ 6d d 6d d 6d d 6d d7 6d d 6d d 6d d> 6d d? 6d d 6d d 6d dB 6d d 6d dF 6d dG 6d 6i d& dK 6d dL 6d d 6d d 6d d` 6d dg 6d& d 6d dx 6d d{ 6d d? 6d dE 6d 6i d& d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d? 6d d 6d d 6d d 6d d 6d 6i d d 6d 6i d dp 6d d 6d 6i d d 6d dc 6d dj 6d do 6d 6} t  j | |  j  } |  j | |  |  j g   d S(   s-   Tests conversion of all the MSBuild settings.s   folder1;folder2;folder3R   t   a_stringR   R   R   R   R    R!   R*   R#   R,   R%   R&   R'   R(   R)   R+   t   4R-   R.   R/   R0   s   d1;d2;d3R1   R2   R3   R4   R5   R6   R9   R:   R;   R<   R=   R>   R?   s   file1;file2;file3R@   RA   RB   RC   RD   RE   RF   RG   RH   RI   RJ   RK   t   3RL   RM   RN   RO   RP   RQ   RR   RS   RT   RU   RV   RW   RX   RY   RZ   R[   R\   R]   R^   R_   R`   Ra   R   Rc   Rf   t%   AdditionalLibraryDirectories_excludedRg   Rh   Ri   Rj   Rk   Rl   Rm   Rn   Ro   Rp   Rq   Rr   Rs   Rt   Ru   Rv   Rw   Rx   Ry   Rz   R{   R|   R}   R~   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   RC  R   R   t   my_nameR   R   R   R   R   R   R   R   R   s   a_string /JR   R   R   R   t   EditAndContinueR  R   t   AsyncR   t   StrictR   t   AnySuitableR   R   R   t   Fullt   CreateR   R   R   R   R   R   R   R   t   Level2R   R   R   t   STAThreadingAttributet   NoErrorReportR  t   PGInstrumentR  t   WindowsR  t
   MachineARMt   HighestAvailableR  RU  R  t   UnsignedR#  t   Allt   Win32R/  R0  R8  R@  RB  RA  N(   R   RF  R   R   R   (   R   RG  RH  RI  (    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt+   testConvertToMSBuildSettings_full_synthetic  s`   c         C   sd	  i i> d d 6d d 6d d 6d d 6d	 d
 6d d 6d	 d 6d d 6d d 6d	 d 6d	 d 6d d 6d d 6d d 6d d 6d d 6d	 d 6d d 6d d 6d d 6d d  6d! d" 6d! d# 6d d$ 6d! d% 6d d& 6d	 d' 6d d( 6d) d* 6d+ d, 6d! d- 6d d. 6d d/ 6d	 d0 6d d1 6d d2 6d3 d4 6d d5 6d d6 6d d7 6d d8 6d9 d: 6d; d< 6d= d> 6d? d@ 6d dA 6d dB 6d dC 6d dD 6d dE 6d dF 6d dG 6d dH 6d dI 6dJ dK 6d dL 6dM dN 6d dO 6d dP 6d dQ 6d dR 6dS dT 6dU 6iM dV dW 6dX dY 6dZ d[ 6d\ d 6d] d^ 6d d_ 6d	 d` 6da db 6dc dd 6d de 6d	 df 6d dg 6dM dh 6di dj 6d dk 6d! dl 6dm dn 6d	 do 6d dp 6dq dr 6d! d" 6d	 ds 6dt du 6dv dw 6d dx 6d dy 6d dz 6d{ d| 6d} d~ 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d! d 6dM d 6d d 6d	 d 6d d 6d d 6da d 6d d 6dq d 6d d 6d d 6d! d 6d! d 6d d 6d d 6d d 6d d 6d d 6d	 d 6d d 6d d 6d d 6d	 d 6d d 6d d 6dt d 6d	 d 6d d 6d dG 6d d 6d d 6d	 d 6d	 d 6d d 6d d 6d} d 6d! d 6d d 6d d 6d dO 6d d 6d 6i d d 6d d 6d d 6d d/ 6d d> 6d d 6d d 6d 6i d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d dG 6d d 6d d 6d d 6d d 6d dO 6d d 6d 6} i i< d d 6d d 6d d 6d d 6d d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6d d" 6d d# 6d d$ 6d d% 6d d& 6d d' 6d d( 6d) d* 6d+ d, 6d d 6d d. 6d d/ 6d d0 6d d 6d d2 6d d 6d d5 6d d6 6d d 6d d8 6d d 6d; d: 6d d 6d d 6d= d> 6d d 6d d 6d d@ 6d dA 6d dB 6d dC 6d dD 6d dE 6d dF 6d dG 6d d 6d dH 6d dI 6dJ dK 6d dL 6d dQ 6d dR 6d dT 6d 6iF dV dW 6dX dY 6dZ d[ 6d\ d 6d] d^ 6d d_ 6d d` 6da db 6dc dd 6dde 6ddf 6d dg 6ddh 6di dj 6d dk 6ddl 6dm dn 6d do 6d dp 6dq dr 6d ds 6dt du 6dv dw 6d dx 6d dz 6d{ d| 6d} d~ 6d d 6d d 6d d6d d 6d d 6d d 6d d 6dd6dd 6d	d 6d d 6da d 6d d 6dq d 6d d 6d d 6d d
6d d 6dd 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6dd 6d d 6d d 6dt d 6dd 6d d 6d dG 6d d 6d d6dd 6d d 6d d 6d d 6d} d 6dd 6d d 6d d 6d6i d d 6d d 6dd 6d d/ 6d d> 6dd 6d d 6d6i d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d dG 6d d 6d d 6d d 6d d 6d6i d d 6d d 6d6i d d 6d dy 6d d 6dd 6d6i dd 6d6} t  j | |  j  } |  j | |  |  j g   dS(  s$	  Tests the conversion of an actual project.

    A VS2008 project with most of the options defined was created through the
    VS2008 IDE.  It was then converted to VS2010.  The tool settings found in
    the .vcproj and .vcxproj files were converted to the two dictionaries
    msvs_settings and expected_msbuild_settings.

    Note that for many settings, the VS2010 converter adds macros like
    %(AdditionalIncludeDirectories) to make sure than inherited values are
    included.  Since the Gyp projects we generate do not use inheritance,
    we removed these macros.  They were:
        ClCompile:
            AdditionalIncludeDirectories:  ';%(AdditionalIncludeDirectories)'
            AdditionalOptions:  ' %(AdditionalOptions)'
            AdditionalUsingDirectories:  ';%(AdditionalUsingDirectories)'
            DisableSpecificWarnings: ';%(DisableSpecificWarnings)',
            ForcedIncludeFiles:  ';%(ForcedIncludeFiles)',
            ForcedUsingFiles:  ';%(ForcedUsingFiles)',
            PreprocessorDefinitions:  ';%(PreprocessorDefinitions)',
            UndefinePreprocessorDefinitions:
                ';%(UndefinePreprocessorDefinitions)',
        Link:
            AdditionalDependencies:  ';%(AdditionalDependencies)',
            AdditionalLibraryDirectories:  ';%(AdditionalLibraryDirectories)',
            AdditionalManifestDependencies:
                ';%(AdditionalManifestDependencies)',
            AdditionalOptions:  ' %(AdditionalOptions)',
            AddModuleNamesToAssembly:  ';%(AddModuleNamesToAssembly)',
            AssemblyLinkResource:  ';%(AssemblyLinkResource)',
            DelayLoadDLLs:  ';%(DelayLoadDLLs)',
            EmbedManagedResourceFile:  ';%(EmbedManagedResourceFile)',
            ForceSymbolReferences:  ';%(ForceSymbolReferences)',
            IgnoreSpecificDefaultLibraries:
                ';%(IgnoreSpecificDefaultLibraries)',
        ResourceCompile:
            AdditionalIncludeDirectories:  ';%(AdditionalIncludeDirectories)',
            AdditionalOptions:  ' %(AdditionalOptions)',
            PreprocessorDefinitions:  ';%(PreprocessorDefinitions)',
        Manifest:
            AdditionalManifestFiles:  ';%(AdditionalManifestFiles)',
            AdditionalOptions:  ' %(AdditionalOptions)',
            InputResourceManifests:  ';%(InputResourceManifests)',
    RK  R   s   /moreR   t   testR   s   $(IntDir)\aR   R*   R!   RY  R#   R%   s   $(IntDir)\eR&   R   R(   R)   R+   RX  R-   R'   R.   R/   R0   t   abcR1   R2   R3   R4   R5   R6   R,   R9   R:   R;   R<   R=   R>   R?   t   defR@   t   geRA   RB   RC   RD   RE   RF   RG   s   $(IntDir)\bRH   RI   RJ   RK   RL   s   $(IntDir)\$(TargetName).pcheRM   s	   StdAfx.hdRN   s   WIN32;_DEBUG;_CONSOLERO   s   $(IntDir)\vc90b.pdbRP   RQ   RR   RS   RT   RU   RV   RW   RX   RY   t   werRZ   R[   R    R\   R]   R^   R_   R`   s   $(IntDir)\cRa   R   t   zxRc   t   asdRf   t   s2Rg   s   /mor2t   d1Rh   Ri   Rj   t   d5Rk   t   23423Rl   Rm   Rn   Ro   Rp   t   d4Rq   Rr   Rs   t   d2Rt   Ru   Rv   t   f5Rw   Rx   t   d3Ry   t   fssdfsdRz   R{   R|   R}   RP  R~   RN  R   R   s	   flob;flokR   R   R   t   f4R   t   f7R   t   f6R   R   R   R   R   s2   $(IntDir)\$(TargetFileName).2intermediate.manifestR   R   R   t   f2R   R   t   f1R   t   sdsdR   R   R   s   $(OutDir)\$(ProjectName)2.exeR   R   R   s   $(TargetDir)$(TargetName).pgddR   s   Flob.pdbR   R   R   R   R   R   t   15R   RQ  R   R   R   R   R   R   R   R   R   t   f3R   R   R   R   R   t   333R   R   s   /more3t   3084R   s   _UNICODE;UNICODE2s   $(IntDir)/$(InputName)3.resR   R   t   sfsdfsdR   t	   afdsdafsdt   sddfdsadfsaR   t   fsdfdsR   s   $(IntDir)\mt.depdfdR   RC  R   t	   asfsfdafsR   s2   $(IntDir)\$(TargetFileName).embed.manifest.resfdsfR   s   $(TargetPath).manifestdfsR   t   sdfsfdR   t   sdffsdR   t   sfsdR   R   R   R   R   s   /more /Js
   $(IntDir)at   AssemblyCodet   EnableFastCheckss
   $(IntDir)et   FastCallR   R\  R   t   QueueR]  t   SizeR^  R   R   R   s
   $(IntDir)bR   R   R`  R   R   s   $(IntDir)$(TargetName).pcheR   R   R   R   s   $(IntDir)vc90b.pdbt   MultiThreadedDebugDLLt   4BytesR   t   Level3s
   $(IntDir)cR   t   ForceSafeILImageR  R   t   UpOnlyR   t   QueueForNextLoginR  R  s1   $(IntDir)$(TargetFileName).2intermediate.manifestR  s   $(OutDir)$(ProjectName)2.exet   LinkVerboseR  R  R  t   RequireAdministratorR  t   0x0c0cs   $(IntDir)%(Filename)3.resR  R@  RA  s1   $(IntDir)$(TargetFileName).embed.manifest.resfdsfRB  N(   R   RF  R   R   R   (   R   RG  RH  RI  (    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt#   testConvertToMSBuildSettings_actualB  s   ,(   t   __name__t
   __module__R   R   R   R   RE  RJ  RM  RV  Rl  R  (    (    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyR       s   					 	
	 	4	 t   __main__(	   t   __doc__R   t   unittestt   gyp.MSVSSettingsR   t   TestCaseR    R  t   main(    (    (    s9   /usr/lib/python2.7/dist-packages/gyp/MSVSSettings_test.pyt   <module>   s        