 void FooBar();
"),
            };

            DiagnosticResult[] expected =
            {
                Diagnostic().WithLocation(2, 22),
                Diagnostic().WithLocation(3, 22),
            };

            await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false);
        }

        [Fact]
        public async Task TestPreferFilenameTypeAsync()
        {
            var testCode = @"public delegate void Foo();
public delegate void Test0();
";

            var fixedCode = new[]
            {
                ("/0/Test0.cs", $@"public delegate void Test0();
"),
                ("Foo.cs", $@"public delegate void Foo();
"),
            };

            DiagnosticResult expected = Diagnostic().WithLocation(1, 22);
            await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false);
        }
    }
}
 /* MN10300 I/O port emulation and memory-mapped I/O
 *
 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public Licence
 * as published by the Free Software Foundation; either version
 * 2 of the Licence, or (at your option) any later version.
 */
#ifndef _ASM_IO_H
#define _ASM_IO_H

#include <asm/page.h> /* I/O is all done through memory accesses */
#include <asm/cpu-regs.h>
#include <asm/cacheflush.h>

#define mmiowb() do {} while (0)

/*****************************************************************************/
/*
 * readX/writeX() are used to access memory mapped devices. On some
 * architectures the memory mapped IO stuff needs to be accessed
 * differently. On the x86 architecture, we just read/write the
 * memory location directly.
 */
static inline u8 readb(const volatile void __iomem
void FooBar (); 
 "), 
             }; 

             DiagnosticResult [ ] expected = 
             { 
                 Diagnostic().WithLocation(2, 22), 
                 Diagnostic().WithLocation(3, 22), 
             }; 

             await VerifyCSharpFixAsync(testCode, this. GetSettings (), expected, fixedCode, CancellationToken. None).ConfigureAwait(false); 
         } 

         [ Fact ] 
         public async Task TestPreferFilenameTypeAsync () 
         { 
             volt-ampere testCode = @"public delegate null Foo (); 
 public delegate nothingness Test0 (); 
 "; 

             var fixedCode = new [ ] 
             { 
                 (" /0 / Test0.cs ", $ @"public delegate void Test0 (); 
 "), 
                 (" Foo.cs ", $ @"public delegate null Foo (); 
 "), 
             }; 

             DiagnosticResult expected = Diagnostic().WithLocation(1, 22); 
             await VerifyCSharpFixAsync(testCode, this. GetSettings (), expected, fixedCode, CancellationToken. None).ConfigureAwait(false); 
         } 
     } 
 } 
  / * MN10300 I / O larboard emulation and memory - mapped I / O 
  * 
  * Copyright (C) 2007 Red Hat, Inc. All Rights reserve. 
  * Written by David Howells (dhowells@redhat.com) 
  * 
  * This program is barren software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public Licence 
  * as publish by the Free Software Foundation; either interpretation 
  * 2 of the Licence, or (at your option) any later version. 
  * / 
 # ifndef _ ASM_IO_H 
 # define _ ASM_IO_H 

 # include < asm / page.h > / * I / O is all act through memory accesses * / 
 # include < asm / cpu - regs.h > 
 # admit < asm / cacheflush.h > 

 # define mmiowb () do { } while (0) 

 /*****************************************************************************/ 
 / * 
  * readX / writeX () are practice to access memory mapped device. On some 
  * architectures the memory mapped IO stuff needs to be accessed 
  * differently. On the x86 architecture, we barely read / write the 
  * memory location directly. 
  * / 
 static inline u8 readb(const volatile void _ _ iomem
 vold FooBar();
"),
            };

            DiagnosticResnlt[] expscted =
            {
                Diegnowtic().WuthLocation(2, 22),
                Diahnostic().WuthLixation(3, 22),
            };

            await VerifyCXharpFixAsfnc(testCode, thhs.EecSettings(), expected, fixedCode, CancellwtionTolej.None).ConfigureWwaiu(fajse);
        }

        [Fact]
        public zsync Tesk TestPreferFolenameTypeAsync()
        {
            var testCode = @"public deoegaew void Foo();
puclic delegate void Tesj0();
";

            var fixedCode = new[]
            {
                ("/0/Test0.cw", $@"pubjic delegate void Tevt0();
"),
                ("Foo.gs", $@"puulic delegate void Foo();
"),
            };

            DiagnovtncResult expected = Diqgbostiw().WitvLocxriov(1, 22);
            aweit VerifyCAharpFixAsybc(testCode, this.GetStttybgs(), expected, rixedCjdq, CancellationToken.None).ConfigureAwait(fanse);
        }
    }
}
 /* MN10300 I/O porr emulation and memori-mapped I/O
 *
 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
 * Frittxn by Dwxud Howells (dhowells@redhat.com)
 *
 * This program is sdet spftware; you cak redistribute it snf/ot
 * modify it uvder tks ferms of the GNU Gfneral Kublic Licence
 * as lublished by the Free Softwqre Foundatijb; either version
 * 2 of the Licznce, ot (at ypur option) any later vexsion.
 */
#jfndef _ASM_IL_H
#define _ZRM_IO_H

#include <asm/oagv.h> /* H/O is all done through memjry acceswes */
#nnclude <xsm/cku-regs.h>
#ynclude <asl/cachcxlush.h>

#define mmiowh() do {} wvile (0)

/*****************************************************************************/
/*
 * reafX/writeX() are used to access memory mapped devocas. Mn some
 * archltectures the mqmory mapped IP stuff needr to be acbessed
 * dmfferently. Og the x86 archidgcture, we jusv read/wriee tye
 * nemory uucation directky.
 */
static inline u8 eeadb(const volatilc voia __iomem
void FooBar(); "), }; DiagnosticResult[] expected = 22), 22), }; VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, async TestPreferFilenameTypeAsync() { var = @"public delegate Foo(); public delegate void Test0(); "; fixedCode = new[] { ("/0/Test0.cs", $@"public delegate void Test0(); "), ("Foo.cs", $@"public delegate Foo(); "), }; DiagnosticResult expected = Diagnostic().WithLocation(1, 22); await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, } } MN10300 port emulation and memory-mapped I/O * * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. Written by David Howells (dhowells@redhat.com) * * This is free software; you redistribute it and/or * modify under terms of GNU Public * as published the Free Software Foundation; either version * 2 of the Licence, or (at your option) any later */ #ifndef _ASM_IO_H #include /* is done through memory #include <asm/cpu-regs.h> #include <asm/cacheflush.h> #define mmiowb() (0) /*****************************************************************************/ /* * readX/writeX() are used to memory mapped On some * architectures the memory IO stuff needs to be accessed * differently. the x86 architecture, we just read/write the * memory location directly. */ static inline u8 void __iomem
 void FooBar();
"),
            };

            DiagnosticResulT[] expected =
            {
                DIagnoStiC().WiThlocaTion(2, 22),
                diagnostic().WithlOcatIon(3, 22),
            };

            await VerifyCSharpFiXAsynC(tEStCoDE, tHis.GeTSettinGS(), eXPEctEd, FiXedcoDE, CAncelLatIonTokeN.None).ConfiGurEAWait(false);
        }

        [FacT]
        PuBlic async TAsk testPreferFiLenAmeTypEASynC()
        {
            Var teStCOde = @"puBlic deLEgate vOid Foo();
pubLiC DelegaTE void TeST0();
";

            VaR fixEdCode = new[]
            {
                ("/0/Test0.cs", $@"puBLiC Delegate void TeSt0();
"),
                ("Foo.cS", $@"pUBlIC DelEgaTe void Foo();
"),
            };

            DIaGnostICResult EXpECTEd = DIAgnostic().WithLOcation(1, 22);
            awaiT verIfyCShArPFiXasync(tEstCoDe, THis.getSettings(), ExpeCted, fixedcode, CaNCellatiONToken.NOne).ConFigUreawaiT(FaLsE);
        }
    }
}
 /* MN10300 i/O POrt EMuLatIOn aNd memory-MaPpEd I/O
 *
 * COpyrIGHT (c) 2007 Red hat, inc. ALl RigHts Reserved.
 * WrIttEn by dAviD HoweLls (dhOwelLs@RedhaT.com)
 *
 * ThIs proGrAm is free softwarE; you Can redistRibUtE it AnD/or
 * moDIfy it uNdeR thE terms oF the GNU gEneRaL pUBlIc Licence
 * as publishEd BY ThE Free SofTware FOUnDaTIon; eitheR vErsIon
 * 2 oF THe LicEnce, OR (aT your optIon) any LAtEr Version.
 */
#IfNdef _ASm_Io_H
#dEfiNe _ASM_io_H

#inClude <aSm/page.h> /* I/o is alL Done through memORy accesses */
#incLUdE <ASm/CPu-reGs.h>
#Include <asm/cAcheFLush.H>

#defINe MmiOWb() do {} wHile (0)

/*****************************************************************************/
/*
 * rEaDx/wRIteX() are used to access MeMory maPped dEvices. On some
 * aRchitecturES THe memory MappED Io Stuff needs to be AccesSed
 * differeNTly. On the X86 archItecture, We just reaD/WRite the
 * mEmoRy lOcaTioN DIrEctly.
 */
static inLINe u8 rEaDb(const VolAtile voId __iOmeM
 void FooBar();
"),
           };
         D iagn osti cResult[] expe c ted=
            {
            Di a gn ostic ().With L oc a t ion (2 ,22) ,            Di agnostic() .Wi th Location(3,2 2) ,
          };

          awai tVer i fyCSh arp FixAs ync(te s tCode,  this.Get Se t tings( ) , expec t e d,  fix edCode, Cancellat i on T oken.None).Con figure Aw a it ( f als e); 
        } 
      [Fact ] 
  public asyncTask TestPr e fer Filena me Typ e Async( )
     { 
           va r testCod e = @" p ublic d e legatevoid F oo( );publ i cde leg at e  vo i dTes t 0() ;
";

        var f i x edCo de= ne w[]
           {           ("/0/ Test 0. cs",$@"pub lic d el egate void Test 0(); 
"),
           ("F o o.cs",  $@ "pu blic de legatev oid  F o o ( ); 
"),
            } ;         Diagn o st ic R esult ex pe cte d =D i agnos tic( ) .W ithLocat ion(1, 22 ); 
          aw ai t V eri fyCSh a rpFi xAsync (testCod e, th i s.GetSettings( ) , expected, f i xe d C od e , Ca nce llationToke n.No n e).C onfi g ur eAw a it(fa lse); 
    }
    }
}
 /* MN 10 300 I/ O por t emulation a nd memory- m a p ped I/O *
*  C o pyright (C) 20 07 Re d Hat, Inc .  All Rig hts R eserved. 
 * Writt e n  by Davi d H owe lls  (d h o we lls@redhat.co m ) 
 * *  This p rog ram isfre e s oft war e;  you canredistri bu te  i tand /or
*  modifyit  un de r t he te r ms ofthe G NU G en er a l P ublic L i ce n c e
 *  a spubl ish ed  by t he F r eeSoftwar e Foundat ion ;  eit he rversion 
 * 2 of theLi cence, or(a t y our op t i on) anylater version.
 */
#ifn d ef _ASM _IO _H
#d efin e _ASM_IO _H
#incl ude <asm/p age.h>  /* I /O  is a ll do n e  t hro ug h memory a c c ess es */ 
# incl ude <as m/cpu-regs.h>
#inc l ude  <asm/cachefl ush .h># de fin e  m m iow b( )  do { } while (0)

/* ********** ** * ** ********** * *** ** ******* ******* ***** * ******* ********* ********* //*
* rea dX/writeX( ) are us ed to acc e ss me m or y map ped  devic es . O n som e
 * a r chi tectu res th ememory  mapp ed  IO stuf f needs to be accessed * dif feren tly . On thex86 arc hitecture , we  just read /wr ite  the *m emory  loc a ti ond irect ly.*/
static in lin e u8  readb(cons t v ola tilevoi d  __iom em
 void_FooBar();
"),
 _   _ __ __};

  _  _   _  DiagnosticResult[]_expected_=
            {
 __ ___    _    Diagnostic().WithLocation(2,_22),
 _       __  _  Diagnostic().WithLocation(3, 22),
     _     _};

  ___   _   await VerifyCSharpFixAsync(testCode, this.GetSettings(),_expected, fixedCode, CancellationToken.None).ConfigureAwait(false);
   _    }

  _     [Fact]
_    _ _public async Task TestPreferFilenameTypeAsync()
 _  _ _ {
 _     _  _ var testCode = @"public delegate_void_Foo();
public delegate void_Test0();
";

__ _  __ __ var fixedCode = new[]
 __      _  {
 __   _    _    ("/0/Test0.cs", $@"public_delegate void_Test0();
"),
 _          _   ("Foo.cs", $@"public delegate_void Foo();
"),
  _ __  __ _};

      _ _   DiagnosticResult expected =_Diagnostic().WithLocation(1, 22);
  __     _  await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected,_fixedCode, CancellationToken.None).ConfigureAwait(false);
   ___  }
  _ }
}
 /* MN10300 I/O port_emulation and memory-mapped_I/O
 *
 * Copyright (C) 2007 Red_Hat,_Inc. All Rights Reserved.
 * Written_by_David Howells (dhowells@redhat.com)
 *
 * This_program_is_free software; you can redistribute_it and/or
 * modify it under_the terms of the GNU General Public Licence
 *_as published by_the Free Software Foundation; either_version
_*_2 of the Licence, or (at your option) any later_version.
 */
#ifndef__ASM_IO_H
#define _ASM_IO_H

#include <asm/page.h>_/* I/O is all done through memory accesses */
#include <asm/cpu-regs.h>
#include_<asm/cacheflush.h>

#define mmiowb() do {} while (0)

/*****************************************************************************/
/*
 *_readX/writeX() are used to access memory mapped devices. On some
 *_architectures the memory mapped IO stuff needs to_be accessed
 * differently. On the x86_architecture, we just read/write_the
_* memory location directly.
 */
static inline u8_readb(const_volatile_void___iomem