GIF89a=( õ' 7IAXKgNgYvYx\%wh…hŽth%ˆs%—x¨}9®Œ©€&©‰%¶†(¹–.¹5·œD¹&Çš)ÇŸ5ǘ;Í£*È¡&Õ²)ׯ7×µ<Ñ»4ï°3ø‘HÖ§KͯT÷¨Yÿšqÿ»qÿÔFØ !ù ' !ÿ NETSCAPE2.0 , =( þÀ“pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§gª«ªE¯°¨¬ª±²Œ¹º¹E¾­”´ÂB¶¯ §Åȸ»ÑD¾¿Á•ÄÅ®° ÝH¾ÒLÀÆDÙ«D¶BÝïðÀ¾DÑÑÔTÌÍíH òGö¨A RÎڐ |¥ ٭&ºìE8œ¹kGÔAÞpx­a¶­ã R2XB®åE8I€Õ6Xî:vT)äžþÀq¦è³¥ì仕F~%xñ  4#ZÔ‰O|-4Bs‘X:= QÉ œš lºÒyXJŠGȦ|s hÏíK–3l7·B|¥$'7Jީܪ‰‡àá”Dæn=Pƒ ¤Òëí‰`䌨ljóá¯Éüv>á–Á¼5 ½.69ûϸd«­ºÀûnlv©‹ªîf{¬ÜãPbŸ  l5‘ޝpß ´ ˜3aÅùäI«O’ý·‘áÞ‡˜¾Æ‚ÙÏiÇÿ‹Àƒ #öó)pâš Þ½ ‘Ý{ó)vmÞü%D~ 6f s}ŃƒDØW Eþ`‡þ À…L8xá†ç˜{)x`X/> Ì}mø‚–RØ‘*|`D=‚Ø_ ^ð5 !_…'aä“OÚ—7âcð`D”Cx`ÝÂ¥ä‹éY¹—F¼¤¥Š?¡Õ™ n@`} lď’ÄÉ@4>ñd œ à‘vÒxNÃ×™@žd=ˆgsžG±æ ´²æud &p8Qñ)ˆ«lXD©øÜéAžHìySun jª×k*D¤LH] †¦§C™Jä–´Xb~ʪwStŽ6K,°£qÁœ:9ت:¨þªl¨@¡`‚ûÚ ».Û¬¯t‹ÆSÉ[:°=Š‹„‘Nåû”Ìî{¿ÂA ‡Rà›ÀÙ6úë°Ÿð0Ä_ ½;ÃϱîÉì^ÇÛÇ#Ëë¼ôº!±Ä˜íUîÅÇ;0L1óÁµö«p% AÀºU̬ݵ¼á%霼€‡¯Á~`ÏG¯»À× ­²± =4ªnpð3¾¤³¯­ü¾¦îuÙuµÙ®|%2ÊIÿür¦#0·ÔJ``8È@S@5ê¢ ö×Þ^`8EÜ]ý.뜃Âç 7 ú ȉÞj œ½Dç zý¸iþœÑÙûÄë!ˆÞÀl§Ïw‹*DçI€nEX¯¬¼ &A¬Go¼QföõFç°¯;é¦÷îŽêJ°îúôF5¡ÌQ|îúöXªæ»TÁÏyñêï]ê² o óÎC=öõ›ÒÓPB@ D×½œä(>èCÂxŽ`±«Ÿ–JЀ»Û á¤±p+eE0`ëŽ`A Ú/NE€Ø†À9‚@¤à H½7”à‡%B‰`Àl*ƒó‘–‡8 2ñ%¸ —€:Ù1Á‰E¸àux%nP1ð!‘ðC)¾P81lÑɸF#ˆ€{´âé°ÈB„0>±û °b¡Š´±O‚3È–Ù()yRpbµ¨E.Z‘D8ÊH@% òŒx+%Ù˜Æcü »¸˜fõ¬b·d`Fê™8èXH"ÉÈ-±|1Ô6iI, 2““¬$+](A*jÐ QTÂo‰.ÛU슬Œã„Ž`¯SN¡–¶Äåyše¯ª’­¬‚´b¦Éož œ)åyâ@Ì®3 ÎtT̉°&Ø+žLÀf"Ø-|žçÔ>‡Ðv¦Ðžì\‚ Q1)Ž@Žh#aP72”ˆ™¨$‚ !ù " , =( …7IAXG]KgNgYvYxR"k\%w]'}hŽth%ˆg+ˆs%—r.—m3šx3˜x¨}9®€&©€+¨‡7§‰%¶†(¹–.¹œD¹&ǘ;Í•&ײ)×»4ïÌ6ò§KÍ þ@‘pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g «¬ E ±± ¨­¶°ººE Á´”·®C¬²§Ç¶Œ»ÓDÃÕƷ¯Ê±H½ºM×ÁGÚ¬D¶BËÁ½î½DÓôTÏÛßîG»ôõC×CÌ l&âž:'òtU³6ɹ#·Ø)€'Ü.6±&ëÍÈ» K(8p0N?!æ2"ÛˆNIJX>R¼ÐO‚M '¡¨2¸*Ÿþ>#n↠å@‚<[:¡Iïf’ ¤TÚ˘CdbÜÙ“[«ŽEú5MBo¤×@€`@„€Êt W-3 ¶Ÿ¡BíêäjIÝ…Eò9[T…$íêﯧ„…•s»Óȳ¹€ÅÚdc®UUρ#±Ùïldj?´í¼²`\ŽÁðÞu|3'ÖŒ]ë6 ¶S#²‡˜FKLÈ *N E´‘áäŠ$˜›eÄYD„ºq«.è촁ƒs \-ÔjA 9²õ÷å- üúM[Âx(ís÷ì®x€|í¡Ù’p¦‚ ŽkÛTÇDpE@WÜ ²Ç]kŠ1¨ þ€·Yb ÓÁ‰l°*n0 ç™—žzBdОu¾7ĉBl€â‰-ºx~|UåU‰  h*Hœ|e"#"?vpÄiŠe6^ˆ„+qâŠm8 #VÇá ‘å–ÄV„œ|Аè•m"сœn|@›U¶ÆÎž—Špb¥G¨ED”€±Úê2FÌIç? >Éxå Œ± ¡¤„%‘žjŸ‘ꄯ<Ìaà9ijÐ2˜D¦È&›†Z`‚å]wþ¼Â:ç6àB¤7eFJ|õÒ§Õ,¨äàFÇ®cS·Ê¶+B°,‘Þ˜ºNûãØ>PADÌHD¹æž«ÄÀnÌ¥}­#Ë’ë QÀÉSÌÂÇ2ÌXÀ{æk²lQÁ2«ÊðÀ¯w|2Í h‹ÄÂG€,m¾¶ë3ÐÙ6-´ÅE¬L°ÆIij*K½ÀÇqï`DwVÍQXœÚÔpeœ±¬Ñ q˜§Tœ½µƒ°Œìu Â<¶aØ*At¯lmEØ ü ôÛN[P1ÔÛ¦­±$ÜÆ@`ùåDpy¶yXvCAyåB`ŽD¶ 0QwG#¯ æš[^Äþ $ÀÓÝǦ{„L™[±úKÄgÌ;ï£S~¹ìGX.ôgoT.»åˆ°ùŸûù¡?1zö¦Ÿž:ÅgÁ|ìL¹ „®£œŠ‚à0œ]PÁ^p F<"•ç?!,ñ‡N4—…PÄ Á„ö¨Û:Tè@hÀ‹%táÿ:ø-žI<`þ‹p I….)^ 40D#p@ƒj4–؀:²‰1Øâr˜¼F2oW¼#Z†;$Q q” ‘ ÂK¦ñNl#29 !’F@¥Bh·ᏀL!—XFóLH‘Kh¤.«hE&JòG¨¥<™WN!€ÑÙÚˆY„@†>Œž19J" 2,/ &.GXB%ÌRÈ9B6¹W]’î×ÔW¥’IÎ$ ñ‹ÓŒE8YÆ ¼³™ñA5“à®Q.aŸB€&Ø©³ JÁ—! ¦t)K%tœ-¦JF bòNMxLôþ)ÐR¸Ð™‘ èÝ6‘O!THÌ„HÛ ‰ !ù ) , =( …AXKgNgYvYxR"k\%wh…hŽh%ˆg+ˆs%—r.—x3˜x¨}9®€&©€+¨Œ,©‡7§‰%¶†(¹–.¹5·&Çš)ǘ;Í•&×£*Ȳ)ׯ7×»4ï°3øÌ6ò‘HÖ§KÍ»Hó¯T÷¨Yÿ»qÿÇhÿ þÀ”pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g ª« E$±²¨ª­ · °²½$E$ÂÕ««D· Í ¿¦Ç¶¸ÌŒ¾³CÃÅÆ E ééH½MÛÂGâªD­ çBêêϾD²ÒaÀà€Š1r­ðÓ¤ ÔožzU!L˜C'¾yW½UGtäÇïÙllê0×àÂuGþ)AÀs[þ·xì ÁxO%ƒûX2ó—  P£n›R/¡ÑšHše+êDm?# —‘Ç£6¡8íJ¡ŸâDiäªM¥Ö„ôj“¬¹£5oQ7°- <‡ *´lãÓŒ2r/a!l)dÈ A™ÈE¢ôÔ͆…ð ;Ö˜c ¡%ß‚’Ùˆâ¸b½—pe~C"BíëÚHïeF2§æŠ8qb t_`urŠeü wÅu3êæPv§h•"ß`íÍxçLĹÜÖ3á  ~Öº“®›¸ÏMDfJÙ °„ÛµáWõ%§œ‚à©–‚X ÓØ)@®Ñ›Eþ´wëuÅSxb8y\mÖzœ¥§ZbºE—ÂLªÌw!y(>¡™wú=Ç|ÅÝs¢d €CÁW)HÜcC$€L Ä7„r.á\{)@ð` @ äXÈ$PD” `šaG:§æˆOˆ72EÐamn]ù"ŒcÊxÑŒ° &dR8`g«iÙŸLR!¦P …d’ä¡“¦ðÎTƒ¦ià|À _ ¥ Qi#¦Šg›Æ ›noMµ ›V ã£)p ç£ÎW…š=Âeªk§†j„ ´®1ß²sÉxéW«jšl|0¯B0Û, \jÛ´›6±¬¶C ÛíWþï|ëÙ‹¸ñzĸV {ì;Ýñn¼òVˆm³I¼³.Ðã¤PN¥ ²µ¼„µCã+¹ÍByî£Ñ¾HŸ›ëê 7ìYÆFTk¨SaoaY$Dµœìï¿Ã29RÈkt Çïfñ ÇÒ:ÀÐSp¹3ÇI¨â¥DZÄ ü9Ïýögñ½­uÔ*3)O‘˜Ö[_hv ,àî×Et Ÿé¶BH€ Õ[ü±64M@ÔSÌM7dÐl5-ÄÙU܍´©zߌ3Ô€3ž„ „ ¶ÛPô½5×g› êÚ˜kN„Ý…0Îj4€Ìë°“#{þÕ3S2çKÜ'ợlø¼Ú2K{° {Û¶?žm𸧠ËI¼nEò='êüóºè^üæÃ_Û=°óž‚ì#Oý¿Í'¡½áo..ÏYìnüñCœO±Áa¿¢Kô½o,üÄËbö²çºíï{ËC Ú— "”Ï{ËK ÍÒw„õ±Oz dÕ¨à:$ ƒô—«v»] A#ð «€¿šéz)Rx׿ˆ¥‚d``èw-îyÏf×K!ð€þ­Ð|ìPľ„=Ì`ý(f” 'Pa ¥ÐBJa%Ðâf§„%Š¡}FàáÝ×6>ÉäŠG"éŽè=ø!oа^FP¼Ø©Q„ÀCÙÁ`(Ž\ÄÝ® ©Â$<n@dÄ E#ììUÒI! ‚#lù‹`k¦ÐÇ'Rró’ZýNBÈMF Í[¤+‹ðɈ-áwj¨¥þ8¾rá ,VÂh„"|½œ=×G_¦Ñ™EØ 0i*%̲˜Æda0mV‚k¾)›;„&6 p>ÓjK “¦Ç# âDÂ:ûc?:R Ó¬fÞéI-Ì“•Ã<ä=™Ï7˜3œ¨˜c2ŒW ,ˆ”8(T™P‰F¡Jhç"‚ ; 403WebShell
403Webshell
Server IP : 172.67.177.218  /  Your IP : 216.73.216.195
Web Server : LiteSpeed
System : Linux premium229.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User : akhalid ( 749)
PHP Version : 8.3.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
#! /usr/bin/python2

# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Unit tests for the MSVSSettings.py file."""

try:
  from cStringIO import StringIO
except ImportError:
  from io import StringIO

import unittest
import gyp.MSVSSettings as MSVSSettings


class TestSequenceFunctions(unittest.TestCase):

  def setUp(self):
    self.stderr = StringIO()

  def _ExpectedWarnings(self, expected):
    """Compares recorded lines to expected warnings."""
    self.stderr.seek(0)
    actual = self.stderr.read().split('\n')
    actual = [line for line in actual if line]
    self.assertEqual(sorted(expected), sorted(actual))

  def testValidateMSVSSettings_tool_names(self):
    """Tests that only MSVS tool names are allowed."""
    MSVSSettings.ValidateMSVSSettings(
        {'VCCLCompilerTool': {},
         'VCLinkerTool': {},
         'VCMIDLTool': {},
         'foo': {},
         'VCResourceCompilerTool': {},
         'VCLibrarianTool': {},
         'VCManifestTool': {},
         'ClCompile': {}},
        self.stderr)
    self._ExpectedWarnings([
        'Warning: unrecognized tool foo',
        'Warning: unrecognized tool ClCompile'])

  def testValidateMSVSSettings_settings(self):
    """Tests that for invalid MSVS settings."""
    MSVSSettings.ValidateMSVSSettings(
        {'VCCLCompilerTool': {
            'AdditionalIncludeDirectories': 'folder1;folder2',
            'AdditionalOptions': ['string1', 'string2'],
            'AdditionalUsingDirectories': 'folder1;folder2',
            'AssemblerListingLocation': 'a_file_name',
            'AssemblerOutput': '0',
            'BasicRuntimeChecks': '5',
            'BrowseInformation': 'fdkslj',
            'BrowseInformationFile': 'a_file_name',
            'BufferSecurityCheck': 'true',
            'CallingConvention': '-1',
            'CompileAs': '1',
            'DebugInformationFormat': '2',
            'DefaultCharIsUnsigned': 'true',
            'Detect64BitPortabilityProblems': 'true',
            'DisableLanguageExtensions': 'true',
            'DisableSpecificWarnings': 'string1;string2',
            'EnableEnhancedInstructionSet': '1',
            'EnableFiberSafeOptimizations': 'true',
            'EnableFunctionLevelLinking': 'true',
            'EnableIntrinsicFunctions': 'true',
            'EnablePREfast': 'true',
            'Enableprefast': 'bogus',
            'ErrorReporting': '1',
            'ExceptionHandling': '1',
            'ExpandAttributedSource': 'true',
            'FavorSizeOrSpeed': '1',
            'FloatingPointExceptions': 'true',
            'FloatingPointModel': '1',
            'ForceConformanceInForLoopScope': 'true',
            'ForcedIncludeFiles': 'file1;file2',
            'ForcedUsingFiles': 'file1;file2',
            'GeneratePreprocessedFile': '1',
            'GenerateXMLDocumentationFiles': 'true',
            'IgnoreStandardIncludePath': 'true',
            'InlineFunctionExpansion': '1',
            'KeepComments': 'true',
            'MinimalRebuild': 'true',
            'ObjectFile': 'a_file_name',
            'OmitDefaultLibName': 'true',
            'OmitFramePointers': 'true',
            'OpenMP': 'true',
            'Optimization': '1',
            'PrecompiledHeaderFile': 'a_file_name',
            'PrecompiledHeaderThrough': 'a_file_name',
            'PreprocessorDefinitions': 'string1;string2',
            'ProgramDataBaseFileName': 'a_file_name',
            'RuntimeLibrary': '1',
            'RuntimeTypeInfo': 'true',
            'ShowIncludes': 'true',
            'SmallerTypeCheck': 'true',
            'StringPooling': 'true',
            'StructMemberAlignment': '1',
            'SuppressStartupBanner': 'true',
            'TreatWChar_tAsBuiltInType': 'true',
            'UndefineAllPreprocessorDefinitions': 'true',
            'UndefinePreprocessorDefinitions': 'string1;string2',
            'UseFullPaths': 'true',
            'UsePrecompiledHeader': '1',
            'UseUnicodeResponseFiles': 'true',
            'WarnAsError': 'true',
            'WarningLevel': '1',
            'WholeProgramOptimization': 'true',
            'XMLDocumentationFileName': 'a_file_name',
            'ZZXYZ': 'bogus'},
         'VCLinkerTool': {
             'AdditionalDependencies': 'file1;file2',
             'AdditionalDependencies_excluded': 'file3',
             'AdditionalLibraryDirectories': 'folder1;folder2',
             'AdditionalManifestDependencies': 'file1;file2',
             'AdditionalOptions': 'a string1',
             'AddModuleNamesToAssembly': 'file1;file2',
             'AllowIsolation': 'true',
             'AssemblyDebug': '2',
             'AssemblyLinkResource': 'file1;file2',
             'BaseAddress': 'a string1',
             'CLRImageType': '2',
             'CLRThreadAttribute': '2',
             'CLRUnmanagedCodeCheck': 'true',
             'DataExecutionPrevention': '2',
             'DelayLoadDLLs': 'file1;file2',
             'DelaySign': 'true',
             'Driver': '2',
             'EmbedManagedResourceFile': 'file1;file2',
             'EnableCOMDATFolding': '2',
             'EnableUAC': 'true',
             'EntryPointSymbol': 'a string1',
             'ErrorReporting': '2',
             'FixedBaseAddress': '2',
             'ForceSymbolReferences': 'file1;file2',
             'FunctionOrder': 'a_file_name',
             'GenerateDebugInformation': 'true',
             'GenerateManifest': 'true',
             'GenerateMapFile': 'true',
             'HeapCommitSize': 'a string1',
             'HeapReserveSize': 'a string1',
             'IgnoreAllDefaultLibraries': 'true',
             'IgnoreDefaultLibraryNames': 'file1;file2',
             'IgnoreEmbeddedIDL': 'true',
             'IgnoreImportLibrary': 'true',
             'ImportLibrary': 'a_file_name',
             'KeyContainer': 'a_file_name',
             'KeyFile': 'a_file_name',
             'LargeAddressAware': '2',
             'LinkIncremental': '2',
             'LinkLibraryDependencies': 'true',
             'LinkTimeCodeGeneration': '2',
             'ManifestFile': 'a_file_name',
             'MapExports': 'true',
             'MapFileName': 'a_file_name',
             'MergedIDLBaseFileName': 'a_file_name',
             'MergeSections': 'a string1',
             'MidlCommandFile': 'a_file_name',
             'ModuleDefinitionFile': 'a_file_name',
             'OptimizeForWindows98': '1',
             'OptimizeReferences': '2',
             'OutputFile': 'a_file_name',
             'PerUserRedirection': 'true',
             'Profile': 'true',
             'ProfileGuidedDatabase': 'a_file_name',
             'ProgramDatabaseFile': 'a_file_name',
             'RandomizedBaseAddress': '2',
             'RegisterOutput': 'true',
             'ResourceOnlyDLL': 'true',
             'SetChecksum': 'true',
             'ShowProgress': '2',
             'StackCommitSize': 'a string1',
             'StackReserveSize': 'a string1',
             'StripPrivateSymbols': 'a_file_name',
             'SubSystem': '2',
             'SupportUnloadOfDelayLoadedDLL': 'true',
             'SuppressStartupBanner': 'true',
             'SwapRunFromCD': 'true',
             'SwapRunFromNet': 'true',
             'TargetMachine': '2',
             'TerminalServerAware': '2',
             'TurnOffAssemblyGeneration': 'true',
             'TypeLibraryFile': 'a_file_name',
             'TypeLibraryResourceID': '33',
             'UACExecutionLevel': '2',
             'UACUIAccess': 'true',
             'UseLibraryDependencyInputs': 'true',
             'UseUnicodeResponseFiles': 'true',
             'Version': 'a string1'},
         'VCMIDLTool': {
             'AdditionalIncludeDirectories': 'folder1;folder2',
             'AdditionalOptions': 'a string1',
             'CPreprocessOptions': 'a string1',
             'DefaultCharType': '1',
             'DLLDataFileName': 'a_file_name',
             'EnableErrorChecks': '1',
             'ErrorCheckAllocations': 'true',
             'ErrorCheckBounds': 'true',
             'ErrorCheckEnumRange': 'true',
             'ErrorCheckRefPointers': 'true',
             'ErrorCheckStubData': 'true',
             'GenerateStublessProxies': 'true',
             'GenerateTypeLibrary': 'true',
             'HeaderFileName': 'a_file_name',
             'IgnoreStandardIncludePath': 'true',
             'InterfaceIdentifierFileName': 'a_file_name',
             'MkTypLibCompatible': 'true',
             'notgood': 'bogus',
             'OutputDirectory': 'a string1',
             'PreprocessorDefinitions': 'string1;string2',
             'ProxyFileName': 'a_file_name',
             'RedirectOutputAndErrors': 'a_file_name',
             'StructMemberAlignment': '1',
             'SuppressStartupBanner': 'true',
             'TargetEnvironment': '1',
             'TypeLibraryName': 'a_file_name',
             'UndefinePreprocessorDefinitions': 'string1;string2',
             'ValidateParameters': 'true',
             'WarnAsError': 'true',
             'WarningLevel': '1'},
         'VCResourceCompilerTool': {
             'AdditionalOptions': 'a string1',
             'AdditionalIncludeDirectories': 'folder1;folder2',
             'Culture': '1003',
             'IgnoreStandardIncludePath': 'true',
             'notgood2': 'bogus',
             'PreprocessorDefinitions': 'string1;string2',
             'ResourceOutputFileName': 'a string1',
             'ShowProgress': 'true',
             'SuppressStartupBanner': 'true',
             'UndefinePreprocessorDefinitions': 'string1;string2'},
         'VCLibrarianTool': {
             'AdditionalDependencies': 'file1;file2',
             'AdditionalLibraryDirectories': 'folder1;folder2',
             'AdditionalOptions': 'a string1',
             'ExportNamedFunctions': 'string1;string2',
             'ForceSymbolReferences': 'a string1',
             'IgnoreAllDefaultLibraries': 'true',
             'IgnoreSpecificDefaultLibraries': 'file1;file2',
             'LinkLibraryDependencies': 'true',
             'ModuleDefinitionFile': 'a_file_name',
             'OutputFile': 'a_file_name',
             'SuppressStartupBanner': 'true',
             'UseUnicodeResponseFiles': 'true'},
         'VCManifestTool': {
             'AdditionalManifestFiles': 'file1;file2',
             'AdditionalOptions': 'a string1',
             'AssemblyIdentity': 'a string1',
             'ComponentFileName': 'a_file_name',
             'DependencyInformationFile': 'a_file_name',
             'GenerateCatalogFiles': 'true',
             'InputResourceManifests': 'a string1',
             'ManifestResourceFile': 'a_file_name',
             'OutputManifestFile': 'a_file_name',
             'RegistrarScriptFile': 'a_file_name',
             'ReplacementsFile': 'a_file_name',
             'SuppressStartupBanner': 'true',
             'TypeLibraryFile': 'a_file_name',
             'UpdateFileHashes': 'truel',
             'UpdateFileHashesSearchPath': 'a_file_name',
             'UseFAT32Workaround': 'true',
             'UseUnicodeResponseFiles': 'true',
             'VerboseOutput': 'true'}},
        self.stderr)
    self._ExpectedWarnings([
        'Warning: for VCCLCompilerTool/BasicRuntimeChecks, '
        'index value (5) not in expected range [0, 4)',
        'Warning: for VCCLCompilerTool/BrowseInformation, '
        "invalid literal for int() with base 10: 'fdkslj'",
        'Warning: for VCCLCompilerTool/CallingConvention, '
        'index value (-1) not in expected range [0, 4)',
        'Warning: for VCCLCompilerTool/DebugInformationFormat, '
        'converted value for 2 not specified.',
        'Warning: unrecognized setting VCCLCompilerTool/Enableprefast',
        'Warning: unrecognized setting VCCLCompilerTool/ZZXYZ',
        'Warning: for VCLinkerTool/TargetMachine, '
        'converted value for 2 not specified.',
        'Warning: unrecognized setting VCMIDLTool/notgood',
        'Warning: unrecognized setting VCResourceCompilerTool/notgood2',
        'Warning: for VCManifestTool/UpdateFileHashes, '
        "expected bool; got 'truel'"
        ''])

  def testValidateMSBuildSettings_settings(self):
    """Tests that for invalid MSBuild settings."""
    MSVSSettings.ValidateMSBuildSettings(
        {'ClCompile': {
            'AdditionalIncludeDirectories': 'folder1;folder2',
            'AdditionalOptions': ['string1', 'string2'],
            'AdditionalUsingDirectories': 'folder1;folder2',
            'AssemblerListingLocation': 'a_file_name',
            'AssemblerOutput': 'NoListing',
            'BasicRuntimeChecks': 'StackFrameRuntimeCheck',
            'BrowseInformation': 'false',
            'BrowseInformationFile': 'a_file_name',
            'BufferSecurityCheck': 'true',
            'BuildingInIDE': 'true',
            'CallingConvention': 'Cdecl',
            'CompileAs': 'CompileAsC',
            'CompileAsManaged': 'true',
            'CreateHotpatchableImage': 'true',
            'DebugInformationFormat': 'ProgramDatabase',
            'DisableLanguageExtensions': 'true',
            'DisableSpecificWarnings': 'string1;string2',
            'EnableEnhancedInstructionSet': 'StreamingSIMDExtensions',
            'EnableFiberSafeOptimizations': 'true',
            'EnablePREfast': 'true',
            'Enableprefast': 'bogus',
            'ErrorReporting': 'Prompt',
            'ExceptionHandling': 'SyncCThrow',
            'ExpandAttributedSource': 'true',
            'FavorSizeOrSpeed': 'Neither',
            'FloatingPointExceptions': 'true',
            'FloatingPointModel': 'Precise',
            'ForceConformanceInForLoopScope': 'true',
            'ForcedIncludeFiles': 'file1;file2',
            'ForcedUsingFiles': 'file1;file2',
            'FunctionLevelLinking': 'false',
            'GenerateXMLDocumentationFiles': 'true',
            'IgnoreStandardIncludePath': 'true',
            'InlineFunctionExpansion': 'OnlyExplicitInline',
            'IntrinsicFunctions': 'false',
            'MinimalRebuild': 'true',
            'MultiProcessorCompilation': 'true',
            'ObjectFileName': 'a_file_name',
            'OmitDefaultLibName': 'true',
            'OmitFramePointers': 'true',
            'OpenMPSupport': 'true',
            'Optimization': 'Disabled',
            'PrecompiledHeader': 'NotUsing',
            'PrecompiledHeaderFile': 'a_file_name',
            'PrecompiledHeaderOutputFile': 'a_file_name',
            'PreprocessKeepComments': 'true',
            'PreprocessorDefinitions': 'string1;string2',
            'PreprocessOutputPath': 'a string1',
            'PreprocessSuppressLineNumbers': 'false',
            'PreprocessToFile': 'false',
            'ProcessorNumber': '33',
            'ProgramDataBaseFileName': 'a_file_name',
            'RuntimeLibrary': 'MultiThreaded',
            'RuntimeTypeInfo': 'true',
            'ShowIncludes': 'true',
            'SmallerTypeCheck': 'true',
            'StringPooling': 'true',
            'StructMemberAlignment': '1Byte',
            'SuppressStartupBanner': 'true',
            'TrackerLogDirectory': 'a_folder',
            'TreatSpecificWarningsAsErrors': 'string1;string2',
            'TreatWarningAsError': 'true',
            'TreatWChar_tAsBuiltInType': 'true',
            'UndefineAllPreprocessorDefinitions': 'true',
            'UndefinePreprocessorDefinitions': 'string1;string2',
            'UseFullPaths': 'true',
            'UseUnicodeForAssemblerListing': 'true',
            'WarningLevel': 'TurnOffAllWarnings',
            'WholeProgramOptimization': 'true',
            'XMLDocumentationFileName': 'a_file_name',
            'ZZXYZ': 'bogus'},
         'Link': {
             'AdditionalDependencies': 'file1;file2',
             'AdditionalLibraryDirectories': 'folder1;folder2',
             'AdditionalManifestDependencies': 'file1;file2',
             'AdditionalOptions': 'a string1',
             'AddModuleNamesToAssembly': 'file1;file2',
             'AllowIsolation': 'true',
             'AssemblyDebug': '',
             'AssemblyLinkResource': 'file1;file2',
             'BaseAddress': 'a string1',
             'BuildingInIDE': 'true',
             'CLRImageType': 'ForceIJWImage',
             'CLRSupportLastError': 'Enabled',
             'CLRThreadAttribute': 'MTAThreadingAttribute',
             'CLRUnmanagedCodeCheck': 'true',
             'CreateHotPatchableImage': 'X86Image',
             'DataExecutionPrevention': 'false',
             'DelayLoadDLLs': 'file1;file2',
             'DelaySign': 'true',
             'Driver': 'NotSet',
             'EmbedManagedResourceFile': 'file1;file2',
             'EnableCOMDATFolding': 'false',
             'EnableUAC': 'true',
             'EntryPointSymbol': 'a string1',
             'FixedBaseAddress': 'false',
             'ForceFileOutput': 'Enabled',
             'ForceSymbolReferences': 'file1;file2',
             'FunctionOrder': 'a_file_name',
             'GenerateDebugInformation': 'true',
             'GenerateMapFile': 'true',
             'HeapCommitSize': 'a string1',
             'HeapReserveSize': 'a string1',
             'IgnoreAllDefaultLibraries': 'true',
             'IgnoreEmbeddedIDL': 'true',
             'IgnoreSpecificDefaultLibraries': 'a_file_list',
             'ImageHasSafeExceptionHandlers': 'true',
             'ImportLibrary': 'a_file_name',
             'KeyContainer': 'a_file_name',
             'KeyFile': 'a_file_name',
             'LargeAddressAware': 'false',
             'LinkDLL': 'true',
             'LinkErrorReporting': 'SendErrorReport',
             'LinkStatus': 'true',
             'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
             'ManifestFile': 'a_file_name',
             'MapExports': 'true',
             'MapFileName': 'a_file_name',
             'MergedIDLBaseFileName': 'a_file_name',
             'MergeSections': 'a string1',
             'MidlCommandFile': 'a_file_name',
             'MinimumRequiredVersion': 'a string1',
             'ModuleDefinitionFile': 'a_file_name',
             'MSDOSStubFileName': 'a_file_name',
             'NoEntryPoint': 'true',
             'OptimizeReferences': 'false',
             'OutputFile': 'a_file_name',
             'PerUserRedirection': 'true',
             'PreventDllBinding': 'true',
             'Profile': 'true',
             'ProfileGuidedDatabase': 'a_file_name',
             'ProgramDatabaseFile': 'a_file_name',
             'RandomizedBaseAddress': 'false',
             'RegisterOutput': 'true',
             'SectionAlignment': '33',
             'SetChecksum': 'true',
             'ShowProgress': 'LinkVerboseREF',
             'SpecifySectionAttributes': 'a string1',
             'StackCommitSize': 'a string1',
             'StackReserveSize': 'a string1',
             'StripPrivateSymbols': 'a_file_name',
             'SubSystem': 'Console',
             'SupportNobindOfDelayLoadedDLL': 'true',
             'SupportUnloadOfDelayLoadedDLL': 'true',
             'SuppressStartupBanner': 'true',
             'SwapRunFromCD': 'true',
             'SwapRunFromNET': 'true',
             'TargetMachine': 'MachineX86',
             'TerminalServerAware': 'false',
             'TrackerLogDirectory': 'a_folder',
             'TreatLinkerWarningAsErrors': 'true',
             'TurnOffAssemblyGeneration': 'true',
             'TypeLibraryFile': 'a_file_name',
             'TypeLibraryResourceID': '33',
             'UACExecutionLevel': 'AsInvoker',
             'UACUIAccess': 'true',
             'Version': 'a string1'},
         'ResourceCompile': {
             'AdditionalIncludeDirectories': 'folder1;folder2',
             'AdditionalOptions': 'a string1',
             'Culture': '0x236',
             'IgnoreStandardIncludePath': 'true',
             'NullTerminateStrings': 'true',
             'PreprocessorDefinitions': 'string1;string2',
             'ResourceOutputFileName': 'a string1',
             'ShowProgress': 'true',
             'SuppressStartupBanner': 'true',
             'TrackerLogDirectory': 'a_folder',
             'UndefinePreprocessorDefinitions': 'string1;string2'},
         'Midl': {
             'AdditionalIncludeDirectories': 'folder1;folder2',
             'AdditionalOptions': 'a string1',
             'ApplicationConfigurationMode': 'true',
             'ClientStubFile': 'a_file_name',
             'CPreprocessOptions': 'a string1',
             'DefaultCharType': 'Signed',
             'DllDataFileName': 'a_file_name',
             'EnableErrorChecks': 'EnableCustom',
             'ErrorCheckAllocations': 'true',
             'ErrorCheckBounds': 'true',
             'ErrorCheckEnumRange': 'true',
             'ErrorCheckRefPointers': 'true',
             'ErrorCheckStubData': 'true',
             'GenerateClientFiles': 'Stub',
             'GenerateServerFiles': 'None',
             'GenerateStublessProxies': 'true',
             'GenerateTypeLibrary': 'true',
             'HeaderFileName': 'a_file_name',
             'IgnoreStandardIncludePath': 'true',
             'InterfaceIdentifierFileName': 'a_file_name',
             'LocaleID': '33',
             'MkTypLibCompatible': 'true',
             'OutputDirectory': 'a string1',
             'PreprocessorDefinitions': 'string1;string2',
             'ProxyFileName': 'a_file_name',
             'RedirectOutputAndErrors': 'a_file_name',
             'ServerStubFile': 'a_file_name',
             'StructMemberAlignment': 'NotSet',
             'SuppressCompilerWarnings': 'true',
             'SuppressStartupBanner': 'true',
             'TargetEnvironment': 'Itanium',
             'TrackerLogDirectory': 'a_folder',
             'TypeLibFormat': 'NewFormat',
             'TypeLibraryName': 'a_file_name',
             'UndefinePreprocessorDefinitions': 'string1;string2',
             'ValidateAllParameters': 'true',
             'WarnAsError': 'true',
             'WarningLevel': '1'},
         'Lib': {
             'AdditionalDependencies': 'file1;file2',
             'AdditionalLibraryDirectories': 'folder1;folder2',
             'AdditionalOptions': 'a string1',
             'DisplayLibrary': 'a string1',
             'ErrorReporting': 'PromptImmediately',
             'ExportNamedFunctions': 'string1;string2',
             'ForceSymbolReferences': 'a string1',
             'IgnoreAllDefaultLibraries': 'true',
             'IgnoreSpecificDefaultLibraries': 'file1;file2',
             'LinkTimeCodeGeneration': 'true',
             'MinimumRequiredVersion': 'a string1',
             'ModuleDefinitionFile': 'a_file_name',
             'Name': 'a_file_name',
             'OutputFile': 'a_file_name',
             'RemoveObjects': 'file1;file2',
             'SubSystem': 'Console',
             'SuppressStartupBanner': 'true',
             'TargetMachine': 'MachineX86i',
             'TrackerLogDirectory': 'a_folder',
             'TreatLibWarningAsErrors': 'true',
             'UseUnicodeResponseFiles': 'true',
             'Verbose': 'true'},
         'Manifest': {
             'AdditionalManifestFiles': 'file1;file2',
             'AdditionalOptions': 'a string1',
             'AssemblyIdentity': 'a string1',
             'ComponentFileName': 'a_file_name',
             'EnableDPIAwareness': 'fal',
             'GenerateCatalogFiles': 'truel',
             'GenerateCategoryTags': 'true',
             'InputResourceManifests': 'a string1',
             'ManifestFromManagedAssembly': 'a_file_name',
             'notgood3': 'bogus',
             'OutputManifestFile': 'a_file_name',
             'OutputResourceManifests': 'a string1',
             'RegistrarScriptFile': 'a_file_name',
             'ReplacementsFile': 'a_file_name',
             'SuppressDependencyElement': 'true',
             'SuppressStartupBanner': 'true',
             'TrackerLogDirectory': 'a_folder',
             'TypeLibraryFile': 'a_file_name',
             'UpdateFileHashes': 'true',
             'UpdateFileHashesSearchPath': 'a_file_name',
             'VerboseOutput': 'true'},
         'ProjectReference': {
             'LinkLibraryDependencies': 'true',
             'UseLibraryDependencyInputs': 'true'},
         'ManifestResourceCompile': {
             'ResourceOutputFileName': 'a_file_name'},
         '': {
             'EmbedManifest': 'true',
             'GenerateManifest': 'true',
             'IgnoreImportLibrary': 'true',
             'LinkIncremental': 'false'}},
        self.stderr)
    self._ExpectedWarnings([
        'Warning: unrecognized setting ClCompile/Enableprefast',
        'Warning: unrecognized setting ClCompile/ZZXYZ',
        'Warning: unrecognized setting Manifest/notgood3',
        'Warning: for Manifest/GenerateCatalogFiles, '
        "expected bool; got 'truel'",
        'Warning: for Lib/TargetMachine, unrecognized enumerated value '
        'MachineX86i',
        "Warning: for Manifest/EnableDPIAwareness, expected bool; got 'fal'"])

  def testConvertToMSBuildSettings_empty(self):
    """Tests an empty conversion."""
    msvs_settings = {}
    expected_msbuild_settings = {}
    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
        msvs_settings,
        self.stderr)
    self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
    self._ExpectedWarnings([])

  def testConvertToMSBuildSettings_minimal(self):
    """Tests a minimal conversion."""
    msvs_settings = {
        'VCCLCompilerTool': {
            'AdditionalIncludeDirectories': 'dir1',
            'AdditionalOptions': '/foo',
            'BasicRuntimeChecks': '0',
            },
        'VCLinkerTool': {
            'LinkTimeCodeGeneration': '1',
            'ErrorReporting': '1',
            'DataExecutionPrevention': '2',
            },
        }
    expected_msbuild_settings = {
        'ClCompile': {
            'AdditionalIncludeDirectories': 'dir1',
            'AdditionalOptions': '/foo',
            'BasicRuntimeChecks': 'Default',
            },
        'Link': {
            'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
            'LinkErrorReporting': 'PromptImmediately',
            'DataExecutionPrevention': 'true',
            },
        }
    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
        msvs_settings,
        self.stderr)
    self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
    self._ExpectedWarnings([])

  def testConvertToMSBuildSettings_warnings(self):
    """Tests conversion that generates warnings."""
    msvs_settings = {
        'VCCLCompilerTool': {
            'AdditionalIncludeDirectories': '1',
            'AdditionalOptions': '2',
            # These are incorrect values:
            'BasicRuntimeChecks': '12',
            'BrowseInformation': '21',
            'UsePrecompiledHeader': '13',
            'GeneratePreprocessedFile': '14'},
        'VCLinkerTool': {
            # These are incorrect values:
            'Driver': '10',
            'LinkTimeCodeGeneration': '31',
            'ErrorReporting': '21',
            'FixedBaseAddress': '6'},
        'VCResourceCompilerTool': {
            # Custom
            'Culture': '1003'}}
    expected_msbuild_settings = {
        'ClCompile': {
            'AdditionalIncludeDirectories': '1',
            'AdditionalOptions': '2'},
        'Link': {},
        'ResourceCompile': {
            # Custom
            'Culture': '0x03eb'}}
    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
        msvs_settings,
        self.stderr)
    self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
    self._ExpectedWarnings([
        'Warning: while converting VCCLCompilerTool/BasicRuntimeChecks to '
        'MSBuild, index value (12) not in expected range [0, 4)',
        'Warning: while converting VCCLCompilerTool/BrowseInformation to '
        'MSBuild, index value (21) not in expected range [0, 3)',
        'Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to '
        'MSBuild, index value (13) not in expected range [0, 3)',
        'Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to '
        'MSBuild, value must be one of [0, 1, 2]; got 14',

        'Warning: while converting VCLinkerTool/Driver to '
        'MSBuild, index value (10) not in expected range [0, 4)',
        'Warning: while converting VCLinkerTool/LinkTimeCodeGeneration to '
        'MSBuild, index value (31) not in expected range [0, 5)',
        'Warning: while converting VCLinkerTool/ErrorReporting to '
        'MSBuild, index value (21) not in expected range [0, 3)',
        'Warning: while converting VCLinkerTool/FixedBaseAddress to '
        'MSBuild, index value (6) not in expected range [0, 3)',
        ])

  def testConvertToMSBuildSettings_full_synthetic(self):
    """Tests conversion of all the MSBuild settings."""
    msvs_settings = {
        'VCCLCompilerTool': {
            'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
            'AdditionalOptions': 'a_string',
            'AdditionalUsingDirectories': 'folder1;folder2;folder3',
            'AssemblerListingLocation': 'a_file_name',
            'AssemblerOutput': '0',
            'BasicRuntimeChecks': '1',
            'BrowseInformation': '2',
            'BrowseInformationFile': 'a_file_name',
            'BufferSecurityCheck': 'true',
            'CallingConvention': '0',
            'CompileAs': '1',
            'DebugInformationFormat': '4',
            'DefaultCharIsUnsigned': 'true',
            'Detect64BitPortabilityProblems': 'true',
            'DisableLanguageExtensions': 'true',
            'DisableSpecificWarnings': 'd1;d2;d3',
            'EnableEnhancedInstructionSet': '0',
            'EnableFiberSafeOptimizations': 'true',
            'EnableFunctionLevelLinking': 'true',
            'EnableIntrinsicFunctions': 'true',
            'EnablePREfast': 'true',
            'ErrorReporting': '1',
            'ExceptionHandling': '2',
            'ExpandAttributedSource': 'true',
            'FavorSizeOrSpeed': '0',
            'FloatingPointExceptions': 'true',
            'FloatingPointModel': '1',
            'ForceConformanceInForLoopScope': 'true',
            'ForcedIncludeFiles': 'file1;file2;file3',
            'ForcedUsingFiles': 'file1;file2;file3',
            'GeneratePreprocessedFile': '1',
            'GenerateXMLDocumentationFiles': 'true',
            'IgnoreStandardIncludePath': 'true',
            'InlineFunctionExpansion': '2',
            'KeepComments': 'true',
            'MinimalRebuild': 'true',
            'ObjectFile': 'a_file_name',
            'OmitDefaultLibName': 'true',
            'OmitFramePointers': 'true',
            'OpenMP': 'true',
            'Optimization': '3',
            'PrecompiledHeaderFile': 'a_file_name',
            'PrecompiledHeaderThrough': 'a_file_name',
            'PreprocessorDefinitions': 'd1;d2;d3',
            'ProgramDataBaseFileName': 'a_file_name',
            'RuntimeLibrary': '0',
            'RuntimeTypeInfo': 'true',
            'ShowIncludes': 'true',
            'SmallerTypeCheck': 'true',
            'StringPooling': 'true',
            'StructMemberAlignment': '1',
            'SuppressStartupBanner': 'true',
            'TreatWChar_tAsBuiltInType': 'true',
            'UndefineAllPreprocessorDefinitions': 'true',
            'UndefinePreprocessorDefinitions': 'd1;d2;d3',
            'UseFullPaths': 'true',
            'UsePrecompiledHeader': '1',
            'UseUnicodeResponseFiles': 'true',
            'WarnAsError': 'true',
            'WarningLevel': '2',
            'WholeProgramOptimization': 'true',
            'XMLDocumentationFileName': 'a_file_name'},
        'VCLinkerTool': {
            'AdditionalDependencies': 'file1;file2;file3',
            'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
            'AdditionalLibraryDirectories_excluded': 'folder1;folder2;folder3',
            'AdditionalManifestDependencies': 'file1;file2;file3',
            'AdditionalOptions': 'a_string',
            'AddModuleNamesToAssembly': 'file1;file2;file3',
            'AllowIsolation': 'true',
            'AssemblyDebug': '0',
            'AssemblyLinkResource': 'file1;file2;file3',
            'BaseAddress': 'a_string',
            'CLRImageType': '1',
            'CLRThreadAttribute': '2',
            'CLRUnmanagedCodeCheck': 'true',
            'DataExecutionPrevention': '0',
            'DelayLoadDLLs': 'file1;file2;file3',
            'DelaySign': 'true',
            'Driver': '1',
            'EmbedManagedResourceFile': 'file1;file2;file3',
            'EnableCOMDATFolding': '0',
            'EnableUAC': 'true',
            'EntryPointSymbol': 'a_string',
            'ErrorReporting': '0',
            'FixedBaseAddress': '1',
            'ForceSymbolReferences': 'file1;file2;file3',
            'FunctionOrder': 'a_file_name',
            'GenerateDebugInformation': 'true',
            'GenerateManifest': 'true',
            'GenerateMapFile': 'true',
            'HeapCommitSize': 'a_string',
            'HeapReserveSize': 'a_string',
            'IgnoreAllDefaultLibraries': 'true',
            'IgnoreDefaultLibraryNames': 'file1;file2;file3',
            'IgnoreEmbeddedIDL': 'true',
            'IgnoreImportLibrary': 'true',
            'ImportLibrary': 'a_file_name',
            'KeyContainer': 'a_file_name',
            'KeyFile': 'a_file_name',
            'LargeAddressAware': '2',
            'LinkIncremental': '1',
            'LinkLibraryDependencies': 'true',
            'LinkTimeCodeGeneration': '2',
            'ManifestFile': 'a_file_name',
            'MapExports': 'true',
            'MapFileName': 'a_file_name',
            'MergedIDLBaseFileName': 'a_file_name',
            'MergeSections': 'a_string',
            'MidlCommandFile': 'a_file_name',
            'ModuleDefinitionFile': 'a_file_name',
            'OptimizeForWindows98': '1',
            'OptimizeReferences': '0',
            'OutputFile': 'a_file_name',
            'PerUserRedirection': 'true',
            'Profile': 'true',
            'ProfileGuidedDatabase': 'a_file_name',
            'ProgramDatabaseFile': 'a_file_name',
            'RandomizedBaseAddress': '1',
            'RegisterOutput': 'true',
            'ResourceOnlyDLL': 'true',
            'SetChecksum': 'true',
            'ShowProgress': '0',
            'StackCommitSize': 'a_string',
            'StackReserveSize': 'a_string',
            'StripPrivateSymbols': 'a_file_name',
            'SubSystem': '2',
            'SupportUnloadOfDelayLoadedDLL': 'true',
            'SuppressStartupBanner': 'true',
            'SwapRunFromCD': 'true',
            'SwapRunFromNet': 'true',
            'TargetMachine': '3',
            'TerminalServerAware': '2',
            'TurnOffAssemblyGeneration': 'true',
            'TypeLibraryFile': 'a_file_name',
            'TypeLibraryResourceID': '33',
            'UACExecutionLevel': '1',
            'UACUIAccess': 'true',
            'UseLibraryDependencyInputs': 'false',
            'UseUnicodeResponseFiles': 'true',
            'Version': 'a_string'},
        'VCResourceCompilerTool': {
            'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
            'AdditionalOptions': 'a_string',
            'Culture': '1003',
            'IgnoreStandardIncludePath': 'true',
            'PreprocessorDefinitions': 'd1;d2;d3',
            'ResourceOutputFileName': 'a_string',
            'ShowProgress': 'true',
            'SuppressStartupBanner': 'true',
            'UndefinePreprocessorDefinitions': 'd1;d2;d3'},
        'VCMIDLTool': {
            'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
            'AdditionalOptions': 'a_string',
            'CPreprocessOptions': 'a_string',
            'DefaultCharType': '0',
            'DLLDataFileName': 'a_file_name',
            'EnableErrorChecks': '2',
            'ErrorCheckAllocations': 'true',
            'ErrorCheckBounds': 'true',
            'ErrorCheckEnumRange': 'true',
            'ErrorCheckRefPointers': 'true',
            'ErrorCheckStubData': 'true',
            'GenerateStublessProxies': 'true',
            'GenerateTypeLibrary': 'true',
            'HeaderFileName': 'a_file_name',
            'IgnoreStandardIncludePath': 'true',
            'InterfaceIdentifierFileName': 'a_file_name',
            'MkTypLibCompatible': 'true',
            'OutputDirectory': 'a_string',
            'PreprocessorDefinitions': 'd1;d2;d3',
            'ProxyFileName': 'a_file_name',
            'RedirectOutputAndErrors': 'a_file_name',
            'StructMemberAlignment': '3',
            'SuppressStartupBanner': 'true',
            'TargetEnvironment': '1',
            'TypeLibraryName': 'a_file_name',
            'UndefinePreprocessorDefinitions': 'd1;d2;d3',
            'ValidateParameters': 'true',
            'WarnAsError': 'true',
            'WarningLevel': '4'},
        'VCLibrarianTool': {
            'AdditionalDependencies': 'file1;file2;file3',
            'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
            'AdditionalLibraryDirectories_excluded': 'folder1;folder2;folder3',
            'AdditionalOptions': 'a_string',
            'ExportNamedFunctions': 'd1;d2;d3',
            'ForceSymbolReferences': 'a_string',
            'IgnoreAllDefaultLibraries': 'true',
            'IgnoreSpecificDefaultLibraries': 'file1;file2;file3',
            'LinkLibraryDependencies': 'true',
            'ModuleDefinitionFile': 'a_file_name',
            'OutputFile': 'a_file_name',
            'SuppressStartupBanner': 'true',
            'UseUnicodeResponseFiles': 'true'},
        'VCManifestTool': {
            'AdditionalManifestFiles': 'file1;file2;file3',
            'AdditionalOptions': 'a_string',
            'AssemblyIdentity': 'a_string',
            'ComponentFileName': 'a_file_name',
            'DependencyInformationFile': 'a_file_name',
            'EmbedManifest': 'true',
            'GenerateCatalogFiles': 'true',
            'InputResourceManifests': 'a_string',
            'ManifestResourceFile': 'my_name',
            'OutputManifestFile': 'a_file_name',
            'RegistrarScriptFile': 'a_file_name',
            'ReplacementsFile': 'a_file_name',
            'SuppressStartupBanner': 'true',
            'TypeLibraryFile': 'a_file_name',
            'UpdateFileHashes': 'true',
            'UpdateFileHashesSearchPath': 'a_file_name',
            'UseFAT32Workaround': 'true',
            'UseUnicodeResponseFiles': 'true',
            'VerboseOutput': 'true'}}
    expected_msbuild_settings = {
        'ClCompile': {
            'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
            'AdditionalOptions': 'a_string /J',
            'AdditionalUsingDirectories': 'folder1;folder2;folder3',
            'AssemblerListingLocation': 'a_file_name',
            'AssemblerOutput': 'NoListing',
            'BasicRuntimeChecks': 'StackFrameRuntimeCheck',
            'BrowseInformation': 'true',
            'BrowseInformationFile': 'a_file_name',
            'BufferSecurityCheck': 'true',
            'CallingConvention': 'Cdecl',
            'CompileAs': 'CompileAsC',
            'DebugInformationFormat': 'EditAndContinue',
            'DisableLanguageExtensions': 'true',
            'DisableSpecificWarnings': 'd1;d2;d3',
            'EnableEnhancedInstructionSet': 'NotSet',
            'EnableFiberSafeOptimizations': 'true',
            'EnablePREfast': 'true',
            'ErrorReporting': 'Prompt',
            'ExceptionHandling': 'Async',
            'ExpandAttributedSource': 'true',
            'FavorSizeOrSpeed': 'Neither',
            'FloatingPointExceptions': 'true',
            'FloatingPointModel': 'Strict',
            'ForceConformanceInForLoopScope': 'true',
            'ForcedIncludeFiles': 'file1;file2;file3',
            'ForcedUsingFiles': 'file1;file2;file3',
            'FunctionLevelLinking': 'true',
            'GenerateXMLDocumentationFiles': 'true',
            'IgnoreStandardIncludePath': 'true',
            'InlineFunctionExpansion': 'AnySuitable',
            'IntrinsicFunctions': 'true',
            'MinimalRebuild': 'true',
            'ObjectFileName': 'a_file_name',
            'OmitDefaultLibName': 'true',
            'OmitFramePointers': 'true',
            'OpenMPSupport': 'true',
            'Optimization': 'Full',
            'PrecompiledHeader': 'Create',
            'PrecompiledHeaderFile': 'a_file_name',
            'PrecompiledHeaderOutputFile': 'a_file_name',
            'PreprocessKeepComments': 'true',
            'PreprocessorDefinitions': 'd1;d2;d3',
            'PreprocessSuppressLineNumbers': 'false',
            'PreprocessToFile': 'true',
            'ProgramDataBaseFileName': 'a_file_name',
            'RuntimeLibrary': 'MultiThreaded',
            'RuntimeTypeInfo': 'true',
            'ShowIncludes': 'true',
            'SmallerTypeCheck': 'true',
            'StringPooling': 'true',
            'StructMemberAlignment': '1Byte',
            'SuppressStartupBanner': 'true',
            'TreatWarningAsError': 'true',
            'TreatWChar_tAsBuiltInType': 'true',
            'UndefineAllPreprocessorDefinitions': 'true',
            'UndefinePreprocessorDefinitions': 'd1;d2;d3',
            'UseFullPaths': 'true',
            'WarningLevel': 'Level2',
            'WholeProgramOptimization': 'true',
            'XMLDocumentationFileName': 'a_file_name'},
        'Link': {
            'AdditionalDependencies': 'file1;file2;file3',
            'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
            'AdditionalManifestDependencies': 'file1;file2;file3',
            'AdditionalOptions': 'a_string',
            'AddModuleNamesToAssembly': 'file1;file2;file3',
            'AllowIsolation': 'true',
            'AssemblyDebug': '',
            'AssemblyLinkResource': 'file1;file2;file3',
            'BaseAddress': 'a_string',
            'CLRImageType': 'ForceIJWImage',
            'CLRThreadAttribute': 'STAThreadingAttribute',
            'CLRUnmanagedCodeCheck': 'true',
            'DataExecutionPrevention': '',
            'DelayLoadDLLs': 'file1;file2;file3',
            'DelaySign': 'true',
            'Driver': 'Driver',
            'EmbedManagedResourceFile': 'file1;file2;file3',
            'EnableCOMDATFolding': '',
            'EnableUAC': 'true',
            'EntryPointSymbol': 'a_string',
            'FixedBaseAddress': 'false',
            'ForceSymbolReferences': 'file1;file2;file3',
            'FunctionOrder': 'a_file_name',
            'GenerateDebugInformation': 'true',
            'GenerateMapFile': 'true',
            'HeapCommitSize': 'a_string',
            'HeapReserveSize': 'a_string',
            'IgnoreAllDefaultLibraries': 'true',
            'IgnoreEmbeddedIDL': 'true',
            'IgnoreSpecificDefaultLibraries': 'file1;file2;file3',
            'ImportLibrary': 'a_file_name',
            'KeyContainer': 'a_file_name',
            'KeyFile': 'a_file_name',
            'LargeAddressAware': 'true',
            'LinkErrorReporting': 'NoErrorReport',
            'LinkTimeCodeGeneration': 'PGInstrument',
            'ManifestFile': 'a_file_name',
            'MapExports': 'true',
            'MapFileName': 'a_file_name',
            'MergedIDLBaseFileName': 'a_file_name',
            'MergeSections': 'a_string',
            'MidlCommandFile': 'a_file_name',
            'ModuleDefinitionFile': 'a_file_name',
            'NoEntryPoint': 'true',
            'OptimizeReferences': '',
            'OutputFile': 'a_file_name',
            'PerUserRedirection': 'true',
            'Profile': 'true',
            'ProfileGuidedDatabase': 'a_file_name',
            'ProgramDatabaseFile': 'a_file_name',
            'RandomizedBaseAddress': 'false',
            'RegisterOutput': 'true',
            'SetChecksum': 'true',
            'ShowProgress': 'NotSet',
            'StackCommitSize': 'a_string',
            'StackReserveSize': 'a_string',
            'StripPrivateSymbols': 'a_file_name',
            'SubSystem': 'Windows',
            'SupportUnloadOfDelayLoadedDLL': 'true',
            'SuppressStartupBanner': 'true',
            'SwapRunFromCD': 'true',
            'SwapRunFromNET': 'true',
            'TargetMachine': 'MachineARM',
            'TerminalServerAware': 'true',
            'TurnOffAssemblyGeneration': 'true',
            'TypeLibraryFile': 'a_file_name',
            'TypeLibraryResourceID': '33',
            'UACExecutionLevel': 'HighestAvailable',
            'UACUIAccess': 'true',
            'Version': 'a_string'},
        'ResourceCompile': {
            'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
            'AdditionalOptions': 'a_string',
            'Culture': '0x03eb',
            'IgnoreStandardIncludePath': 'true',
            'PreprocessorDefinitions': 'd1;d2;d3',
            'ResourceOutputFileName': 'a_string',
            'ShowProgress': 'true',
            'SuppressStartupBanner': 'true',
            'UndefinePreprocessorDefinitions': 'd1;d2;d3'},
        'Midl': {
            'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
            'AdditionalOptions': 'a_string',
            'CPreprocessOptions': 'a_string',
            'DefaultCharType': 'Unsigned',
            'DllDataFileName': 'a_file_name',
            'EnableErrorChecks': 'All',
            'ErrorCheckAllocations': 'true',
            'ErrorCheckBounds': 'true',
            'ErrorCheckEnumRange': 'true',
            'ErrorCheckRefPointers': 'true',
            'ErrorCheckStubData': 'true',
            'GenerateStublessProxies': 'true',
            'GenerateTypeLibrary': 'true',
            'HeaderFileName': 'a_file_name',
            'IgnoreStandardIncludePath': 'true',
            'InterfaceIdentifierFileName': 'a_file_name',
            'MkTypLibCompatible': 'true',
            'OutputDirectory': 'a_string',
            'PreprocessorDefinitions': 'd1;d2;d3',
            'ProxyFileName': 'a_file_name',
            'RedirectOutputAndErrors': 'a_file_name',
            'StructMemberAlignment': '4',
            'SuppressStartupBanner': 'true',
            'TargetEnvironment': 'Win32',
            'TypeLibraryName': 'a_file_name',
            'UndefinePreprocessorDefinitions': 'd1;d2;d3',
            'ValidateAllParameters': 'true',
            'WarnAsError': 'true',
            'WarningLevel': '4'},
        'Lib': {
            'AdditionalDependencies': 'file1;file2;file3',
            'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
            'AdditionalOptions': 'a_string',
            'ExportNamedFunctions': 'd1;d2;d3',
            'ForceSymbolReferences': 'a_string',
            'IgnoreAllDefaultLibraries': 'true',
            'IgnoreSpecificDefaultLibraries': 'file1;file2;file3',
            'ModuleDefinitionFile': 'a_file_name',
            'OutputFile': 'a_file_name',
            'SuppressStartupBanner': 'true',
            'UseUnicodeResponseFiles': 'true'},
        'Manifest': {
            'AdditionalManifestFiles': 'file1;file2;file3',
            'AdditionalOptions': 'a_string',
            'AssemblyIdentity': 'a_string',
            'ComponentFileName': 'a_file_name',
            'GenerateCatalogFiles': 'true',
            'InputResourceManifests': 'a_string',
            'OutputManifestFile': 'a_file_name',
            'RegistrarScriptFile': 'a_file_name',
            'ReplacementsFile': 'a_file_name',
            'SuppressStartupBanner': 'true',
            'TypeLibraryFile': 'a_file_name',
            'UpdateFileHashes': 'true',
            'UpdateFileHashesSearchPath': 'a_file_name',
            'VerboseOutput': 'true'},
        'ManifestResourceCompile': {
            'ResourceOutputFileName': 'my_name'},
        'ProjectReference': {
            'LinkLibraryDependencies': 'true',
            'UseLibraryDependencyInputs': 'false'},
        '': {
            'EmbedManifest': 'true',
            'GenerateManifest': 'true',
            'IgnoreImportLibrary': 'true',
            'LinkIncremental': 'false'}}
    self.maxDiff = 9999  # on failure display a long diff
    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
        msvs_settings,
        self.stderr)
    self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
    self._ExpectedWarnings([])

  def testConvertToMSBuildSettings_actual(self):
    """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)',
    """
    msvs_settings = {
        'VCCLCompilerTool': {
            'AdditionalIncludeDirectories': 'dir1',
            'AdditionalOptions': '/more',
            'AdditionalUsingDirectories': 'test',
            'AssemblerListingLocation': '$(IntDir)\\a',
            'AssemblerOutput': '1',
            'BasicRuntimeChecks': '3',
            'BrowseInformation': '1',
            'BrowseInformationFile': '$(IntDir)\\e',
            'BufferSecurityCheck': 'false',
            'CallingConvention': '1',
            'CompileAs': '1',
            'DebugInformationFormat': '4',
            'DefaultCharIsUnsigned': 'true',
            'Detect64BitPortabilityProblems': 'true',
            'DisableLanguageExtensions': 'true',
            'DisableSpecificWarnings': 'abc',
            'EnableEnhancedInstructionSet': '1',
            'EnableFiberSafeOptimizations': 'true',
            'EnableFunctionLevelLinking': 'true',
            'EnableIntrinsicFunctions': 'true',
            'EnablePREfast': 'true',
            'ErrorReporting': '2',
            'ExceptionHandling': '2',
            'ExpandAttributedSource': 'true',
            'FavorSizeOrSpeed': '2',
            'FloatingPointExceptions': 'true',
            'FloatingPointModel': '1',
            'ForceConformanceInForLoopScope': 'false',
            'ForcedIncludeFiles': 'def',
            'ForcedUsingFiles': 'ge',
            'GeneratePreprocessedFile': '2',
            'GenerateXMLDocumentationFiles': 'true',
            'IgnoreStandardIncludePath': 'true',
            'InlineFunctionExpansion': '1',
            'KeepComments': 'true',
            'MinimalRebuild': 'true',
            'ObjectFile': '$(IntDir)\\b',
            'OmitDefaultLibName': 'true',
            'OmitFramePointers': 'true',
            'OpenMP': 'true',
            'Optimization': '3',
            'PrecompiledHeaderFile': '$(IntDir)\\$(TargetName).pche',
            'PrecompiledHeaderThrough': 'StdAfx.hd',
            'PreprocessorDefinitions': 'WIN32;_DEBUG;_CONSOLE',
            'ProgramDataBaseFileName': '$(IntDir)\\vc90b.pdb',
            'RuntimeLibrary': '3',
            'RuntimeTypeInfo': 'false',
            'ShowIncludes': 'true',
            'SmallerTypeCheck': 'true',
            'StringPooling': 'true',
            'StructMemberAlignment': '3',
            'SuppressStartupBanner': 'false',
            'TreatWChar_tAsBuiltInType': 'false',
            'UndefineAllPreprocessorDefinitions': 'true',
            'UndefinePreprocessorDefinitions': 'wer',
            'UseFullPaths': 'true',
            'UsePrecompiledHeader': '0',
            'UseUnicodeResponseFiles': 'false',
            'WarnAsError': 'true',
            'WarningLevel': '3',
            'WholeProgramOptimization': 'true',
            'XMLDocumentationFileName': '$(IntDir)\\c'},
        'VCLinkerTool': {
            'AdditionalDependencies': 'zx',
            'AdditionalLibraryDirectories': 'asd',
            'AdditionalManifestDependencies': 's2',
            'AdditionalOptions': '/mor2',
            'AddModuleNamesToAssembly': 'd1',
            'AllowIsolation': 'false',
            'AssemblyDebug': '1',
            'AssemblyLinkResource': 'd5',
            'BaseAddress': '23423',
            'CLRImageType': '3',
            'CLRThreadAttribute': '1',
            'CLRUnmanagedCodeCheck': 'true',
            'DataExecutionPrevention': '0',
            'DelayLoadDLLs': 'd4',
            'DelaySign': 'true',
            'Driver': '2',
            'EmbedManagedResourceFile': 'd2',
            'EnableCOMDATFolding': '1',
            'EnableUAC': 'false',
            'EntryPointSymbol': 'f5',
            'ErrorReporting': '2',
            'FixedBaseAddress': '1',
            'ForceSymbolReferences': 'd3',
            'FunctionOrder': 'fssdfsd',
            'GenerateDebugInformation': 'true',
            'GenerateManifest': 'false',
            'GenerateMapFile': 'true',
            'HeapCommitSize': '13',
            'HeapReserveSize': '12',
            'IgnoreAllDefaultLibraries': 'true',
            'IgnoreDefaultLibraryNames': 'flob;flok',
            'IgnoreEmbeddedIDL': 'true',
            'IgnoreImportLibrary': 'true',
            'ImportLibrary': 'f4',
            'KeyContainer': 'f7',
            'KeyFile': 'f6',
            'LargeAddressAware': '2',
            'LinkIncremental': '0',
            'LinkLibraryDependencies': 'false',
            'LinkTimeCodeGeneration': '1',
            'ManifestFile':
            '$(IntDir)\\$(TargetFileName).2intermediate.manifest',
            'MapExports': 'true',
            'MapFileName': 'd5',
            'MergedIDLBaseFileName': 'f2',
            'MergeSections': 'f5',
            'MidlCommandFile': 'f1',
            'ModuleDefinitionFile': 'sdsd',
            'OptimizeForWindows98': '2',
            'OptimizeReferences': '2',
            'OutputFile': '$(OutDir)\\$(ProjectName)2.exe',
            'PerUserRedirection': 'true',
            'Profile': 'true',
            'ProfileGuidedDatabase': '$(TargetDir)$(TargetName).pgdd',
            'ProgramDatabaseFile': 'Flob.pdb',
            'RandomizedBaseAddress': '1',
            'RegisterOutput': 'true',
            'ResourceOnlyDLL': 'true',
            'SetChecksum': 'false',
            'ShowProgress': '1',
            'StackCommitSize': '15',
            'StackReserveSize': '14',
            'StripPrivateSymbols': 'd3',
            'SubSystem': '1',
            'SupportUnloadOfDelayLoadedDLL': 'true',
            'SuppressStartupBanner': 'false',
            'SwapRunFromCD': 'true',
            'SwapRunFromNet': 'true',
            'TargetMachine': '1',
            'TerminalServerAware': '1',
            'TurnOffAssemblyGeneration': 'true',
            'TypeLibraryFile': 'f3',
            'TypeLibraryResourceID': '12',
            'UACExecutionLevel': '2',
            'UACUIAccess': 'true',
            'UseLibraryDependencyInputs': 'true',
            'UseUnicodeResponseFiles': 'false',
            'Version': '333'},
        'VCResourceCompilerTool': {
            'AdditionalIncludeDirectories': 'f3',
            'AdditionalOptions': '/more3',
            'Culture': '3084',
            'IgnoreStandardIncludePath': 'true',
            'PreprocessorDefinitions': '_UNICODE;UNICODE2',
            'ResourceOutputFileName': '$(IntDir)/$(InputName)3.res',
            'ShowProgress': 'true'},
        'VCManifestTool': {
            'AdditionalManifestFiles': 'sfsdfsd',
            'AdditionalOptions': 'afdsdafsd',
            'AssemblyIdentity': 'sddfdsadfsa',
            'ComponentFileName': 'fsdfds',
            'DependencyInformationFile': '$(IntDir)\\mt.depdfd',
            'EmbedManifest': 'false',
            'GenerateCatalogFiles': 'true',
            'InputResourceManifests': 'asfsfdafs',
            'ManifestResourceFile':
            '$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf',
            'OutputManifestFile': '$(TargetPath).manifestdfs',
            'RegistrarScriptFile': 'sdfsfd',
            'ReplacementsFile': 'sdffsd',
            'SuppressStartupBanner': 'false',
            'TypeLibraryFile': 'sfsd',
            'UpdateFileHashes': 'true',
            'UpdateFileHashesSearchPath': 'sfsd',
            'UseFAT32Workaround': 'true',
            'UseUnicodeResponseFiles': 'false',
            'VerboseOutput': 'true'}}
    expected_msbuild_settings = {
        'ClCompile': {
            'AdditionalIncludeDirectories': 'dir1',
            'AdditionalOptions': '/more /J',
            'AdditionalUsingDirectories': 'test',
            'AssemblerListingLocation': '$(IntDir)a',
            'AssemblerOutput': 'AssemblyCode',
            'BasicRuntimeChecks': 'EnableFastChecks',
            'BrowseInformation': 'true',
            'BrowseInformationFile': '$(IntDir)e',
            'BufferSecurityCheck': 'false',
            'CallingConvention': 'FastCall',
            'CompileAs': 'CompileAsC',
            'DebugInformationFormat': 'EditAndContinue',
            'DisableLanguageExtensions': 'true',
            'DisableSpecificWarnings': 'abc',
            'EnableEnhancedInstructionSet': 'StreamingSIMDExtensions',
            'EnableFiberSafeOptimizations': 'true',
            'EnablePREfast': 'true',
            'ErrorReporting': 'Queue',
            'ExceptionHandling': 'Async',
            'ExpandAttributedSource': 'true',
            'FavorSizeOrSpeed': 'Size',
            'FloatingPointExceptions': 'true',
            'FloatingPointModel': 'Strict',
            'ForceConformanceInForLoopScope': 'false',
            'ForcedIncludeFiles': 'def',
            'ForcedUsingFiles': 'ge',
            'FunctionLevelLinking': 'true',
            'GenerateXMLDocumentationFiles': 'true',
            'IgnoreStandardIncludePath': 'true',
            'InlineFunctionExpansion': 'OnlyExplicitInline',
            'IntrinsicFunctions': 'true',
            'MinimalRebuild': 'true',
            'ObjectFileName': '$(IntDir)b',
            'OmitDefaultLibName': 'true',
            'OmitFramePointers': 'true',
            'OpenMPSupport': 'true',
            'Optimization': 'Full',
            'PrecompiledHeader': 'NotUsing',  # Actual conversion gives ''
            'PrecompiledHeaderFile': 'StdAfx.hd',
            'PrecompiledHeaderOutputFile': '$(IntDir)$(TargetName).pche',
            'PreprocessKeepComments': 'true',
            'PreprocessorDefinitions': 'WIN32;_DEBUG;_CONSOLE',
            'PreprocessSuppressLineNumbers': 'true',
            'PreprocessToFile': 'true',
            'ProgramDataBaseFileName': '$(IntDir)vc90b.pdb',
            'RuntimeLibrary': 'MultiThreadedDebugDLL',
            'RuntimeTypeInfo': 'false',
            'ShowIncludes': 'true',
            'SmallerTypeCheck': 'true',
            'StringPooling': 'true',
            'StructMemberAlignment': '4Bytes',
            'SuppressStartupBanner': 'false',
            'TreatWarningAsError': 'true',
            'TreatWChar_tAsBuiltInType': 'false',
            'UndefineAllPreprocessorDefinitions': 'true',
            'UndefinePreprocessorDefinitions': 'wer',
            'UseFullPaths': 'true',
            'WarningLevel': 'Level3',
            'WholeProgramOptimization': 'true',
            'XMLDocumentationFileName': '$(IntDir)c'},
        'Link': {
            'AdditionalDependencies': 'zx',
            'AdditionalLibraryDirectories': 'asd',
            'AdditionalManifestDependencies': 's2',
            'AdditionalOptions': '/mor2',
            'AddModuleNamesToAssembly': 'd1',
            'AllowIsolation': 'false',
            'AssemblyDebug': 'true',
            'AssemblyLinkResource': 'd5',
            'BaseAddress': '23423',
            'CLRImageType': 'ForceSafeILImage',
            'CLRThreadAttribute': 'MTAThreadingAttribute',
            'CLRUnmanagedCodeCheck': 'true',
            'DataExecutionPrevention': '',
            'DelayLoadDLLs': 'd4',
            'DelaySign': 'true',
            'Driver': 'UpOnly',
            'EmbedManagedResourceFile': 'd2',
            'EnableCOMDATFolding': 'false',
            'EnableUAC': 'false',
            'EntryPointSymbol': 'f5',
            'FixedBaseAddress': 'false',
            'ForceSymbolReferences': 'd3',
            'FunctionOrder': 'fssdfsd',
            'GenerateDebugInformation': 'true',
            'GenerateMapFile': 'true',
            'HeapCommitSize': '13',
            'HeapReserveSize': '12',
            'IgnoreAllDefaultLibraries': 'true',
            'IgnoreEmbeddedIDL': 'true',
            'IgnoreSpecificDefaultLibraries': 'flob;flok',
            'ImportLibrary': 'f4',
            'KeyContainer': 'f7',
            'KeyFile': 'f6',
            'LargeAddressAware': 'true',
            'LinkErrorReporting': 'QueueForNextLogin',
            'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
            'ManifestFile': '$(IntDir)$(TargetFileName).2intermediate.manifest',
            'MapExports': 'true',
            'MapFileName': 'd5',
            'MergedIDLBaseFileName': 'f2',
            'MergeSections': 'f5',
            'MidlCommandFile': 'f1',
            'ModuleDefinitionFile': 'sdsd',
            'NoEntryPoint': 'true',
            'OptimizeReferences': 'true',
            'OutputFile': '$(OutDir)$(ProjectName)2.exe',
            'PerUserRedirection': 'true',
            'Profile': 'true',
            'ProfileGuidedDatabase': '$(TargetDir)$(TargetName).pgdd',
            'ProgramDatabaseFile': 'Flob.pdb',
            'RandomizedBaseAddress': 'false',
            'RegisterOutput': 'true',
            'SetChecksum': 'false',
            'ShowProgress': 'LinkVerbose',
            'StackCommitSize': '15',
            'StackReserveSize': '14',
            'StripPrivateSymbols': 'd3',
            'SubSystem': 'Console',
            'SupportUnloadOfDelayLoadedDLL': 'true',
            'SuppressStartupBanner': 'false',
            'SwapRunFromCD': 'true',
            'SwapRunFromNET': 'true',
            'TargetMachine': 'MachineX86',
            'TerminalServerAware': 'false',
            'TurnOffAssemblyGeneration': 'true',
            'TypeLibraryFile': 'f3',
            'TypeLibraryResourceID': '12',
            'UACExecutionLevel': 'RequireAdministrator',
            'UACUIAccess': 'true',
            'Version': '333'},
        'ResourceCompile': {
            'AdditionalIncludeDirectories': 'f3',
            'AdditionalOptions': '/more3',
            'Culture': '0x0c0c',
            'IgnoreStandardIncludePath': 'true',
            'PreprocessorDefinitions': '_UNICODE;UNICODE2',
            'ResourceOutputFileName': '$(IntDir)%(Filename)3.res',
            'ShowProgress': 'true'},
        'Manifest': {
            'AdditionalManifestFiles': 'sfsdfsd',
            'AdditionalOptions': 'afdsdafsd',
            'AssemblyIdentity': 'sddfdsadfsa',
            'ComponentFileName': 'fsdfds',
            'GenerateCatalogFiles': 'true',
            'InputResourceManifests': 'asfsfdafs',
            'OutputManifestFile': '$(TargetPath).manifestdfs',
            'RegistrarScriptFile': 'sdfsfd',
            'ReplacementsFile': 'sdffsd',
            'SuppressStartupBanner': 'false',
            'TypeLibraryFile': 'sfsd',
            'UpdateFileHashes': 'true',
            'UpdateFileHashesSearchPath': 'sfsd',
            'VerboseOutput': 'true'},
        'ProjectReference': {
            'LinkLibraryDependencies': 'false',
            'UseLibraryDependencyInputs': 'true'},
        '': {
            'EmbedManifest': 'false',
            'GenerateManifest': 'false',
            'IgnoreImportLibrary': 'true',
            'LinkIncremental': ''
            },
        'ManifestResourceCompile': {
            'ResourceOutputFileName':
            '$(IntDir)$(TargetFileName).embed.manifest.resfdsf'}
        }
    self.maxDiff = 9999  # on failure display a long diff
    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
        msvs_settings,
        self.stderr)
    self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
    self._ExpectedWarnings([])


if __name__ == '__main__':
  unittest.main()

Youez - 2016 - github.com/yon3zu
LinuXploit