[Mac] Add ApiTypoTest (#1190)
This commit is contained in:
Родитель
42775bac58
Коммит
2dcace0c7a
|
@ -421,6 +421,228 @@ namespace Introspection
|
|||
"Nibfor",
|
||||
"Delegatequeue",
|
||||
"Sispatch",
|
||||
#endif
|
||||
#if MONOMAC
|
||||
"Abbr",
|
||||
"Accum",
|
||||
"Addin",
|
||||
"Addons",
|
||||
"Appactive",
|
||||
"Approx",
|
||||
"Arae",
|
||||
"Attr",
|
||||
"Attributesfor",
|
||||
"Autoresizin",
|
||||
"Avc",
|
||||
"Callpout",
|
||||
"Ccitt",
|
||||
"Commited",
|
||||
"Constrainted",
|
||||
"Ctm",
|
||||
"Cymk",
|
||||
"Cymka",
|
||||
"Cmyka",
|
||||
"Compat",
|
||||
"Credendtials",
|
||||
"Descriptorat",
|
||||
"Descriptorfor",
|
||||
"Dimensionsfor",
|
||||
"Dissapearing",
|
||||
"Dirs",
|
||||
"Editability",
|
||||
"Eisu",
|
||||
"Entryat",
|
||||
"Equiv",
|
||||
"Fourty",
|
||||
"Grammarl",
|
||||
"Greeking",
|
||||
"Hsb",
|
||||
"Hsba",
|
||||
"Ibss",
|
||||
"Iconfor",
|
||||
"Incrementor",
|
||||
"Indexeffective",
|
||||
"Indexestable",
|
||||
"Itemto",
|
||||
"Lowsrc",
|
||||
"Lpcm",
|
||||
"Lzw",
|
||||
"Mihret",
|
||||
"Mps",
|
||||
"Nonenumerated",
|
||||
"Nsevent",
|
||||
"Numberof",
|
||||
"Orginal",
|
||||
"Parms",
|
||||
"Pbm",
|
||||
"Pde",
|
||||
"Performwith",
|
||||
"Phy",
|
||||
"Pmgt",
|
||||
"Preceeding",
|
||||
"Preds",
|
||||
"Previewable",
|
||||
"Qtvr",
|
||||
"Rangewith",
|
||||
"Rangeswith",
|
||||
"Reassociation",
|
||||
"Rectfrom",
|
||||
"Registeration",
|
||||
"Segmentnew",
|
||||
"Semitransient",
|
||||
"Sixtyfour",
|
||||
"Sourcei",
|
||||
"Steppable",
|
||||
"Stringto",
|
||||
"Succesfully",
|
||||
"Supression",
|
||||
"Targetand",
|
||||
"Tkip",
|
||||
"Tsn",
|
||||
"Tunesi",
|
||||
"Twentyfour",
|
||||
"Uneditable",
|
||||
"Unfocus",
|
||||
"Unpublish",
|
||||
"Usec",
|
||||
"Usedby",
|
||||
"Viewwrite",
|
||||
"Wep",
|
||||
"Wme",
|
||||
"Writeln",
|
||||
"Xattr",
|
||||
#if !XAMCORE_2_0
|
||||
// classic only mistakes - that should not change anymore
|
||||
"Oml",
|
||||
"Abgr",
|
||||
"Alc",
|
||||
"Alignmentrange",
|
||||
"Amd",
|
||||
"Argb",
|
||||
"Arrayrestricted",
|
||||
"Arrowhighlight",
|
||||
"Atc",
|
||||
"Atrrib",
|
||||
"Attribs",
|
||||
"Backgrounn",
|
||||
"Bgr",
|
||||
"Bgra",
|
||||
"Blittable",
|
||||
"Bptc",
|
||||
"Bufferi",
|
||||
"Ccw",
|
||||
"Chn",
|
||||
"Classand",
|
||||
"Clipmap",
|
||||
"Cnd",
|
||||
"Coeff",
|
||||
"Columnto",
|
||||
"Columnwith",
|
||||
"Completionfor",
|
||||
"Compressionfactor",
|
||||
"Coumn",
|
||||
"Decr",
|
||||
"Depthfunc",
|
||||
"Dfx",
|
||||
"Directionrange",
|
||||
"Dsize",
|
||||
"Dsdt",
|
||||
"Dst",
|
||||
"Dudv",
|
||||
"Edgeflag",
|
||||
"Efx",
|
||||
"Envmap",
|
||||
"Ffd",
|
||||
"Framebuffers",
|
||||
"Framezoom",
|
||||
"Frg",
|
||||
"Froom",
|
||||
"Funcs",
|
||||
"Gainsboro",
|
||||
"Gequal",
|
||||
"Gremedy",
|
||||
"Minmax",
|
||||
"Ibm",
|
||||
"ImgProgramBinary",
|
||||
"Incr",
|
||||
"Indexvalue",
|
||||
"Ingr",
|
||||
"Itemat",
|
||||
"Iui",
|
||||
"Latc",
|
||||
"Layeredge",
|
||||
"Lequal",
|
||||
"Listenerfv",
|
||||
"Lsb",
|
||||
"Markerto",
|
||||
"Meminfo",
|
||||
"Minmax",
|
||||
"monomac",
|
||||
"Mousein",
|
||||
"Multisampled",
|
||||
"Multitexture",
|
||||
"Mux",
|
||||
"Mvp",
|
||||
"Nand",
|
||||
"Nodechild",
|
||||
"Oes",
|
||||
"Opacityin",
|
||||
"Ortho",
|
||||
"Paletted",
|
||||
"Panelfor",
|
||||
"Pasteboardtype",
|
||||
"Pasteboardtypes",
|
||||
"Perfmon",
|
||||
"Pgi",
|
||||
"Phasein",
|
||||
"Preclip",
|
||||
"Pointerv",
|
||||
"Positionof",
|
||||
"Priorityfor",
|
||||
"Qcom",
|
||||
"Rangeaffinitystill",
|
||||
"Rangesaffinitystill",
|
||||
"Rangereplacement",
|
||||
"Rangesreplacement",
|
||||
"Recip",
|
||||
"Rectby",
|
||||
"Rectcolorturned",
|
||||
"Rectto",
|
||||
"Rectwith",
|
||||
"Rgtc",
|
||||
"Rowcolumn",
|
||||
"Rowin",
|
||||
"Scalebias",
|
||||
"Sgi",
|
||||
"Sgis",
|
||||
"Sgix",
|
||||
"SgixYcrcba",
|
||||
"Sgx",
|
||||
"Sluminance",
|
||||
"Sourceb",
|
||||
"Sourcef",
|
||||
"Staterange",
|
||||
"Stq",
|
||||
"Strq",
|
||||
"Subtexture",
|
||||
"Sunx",
|
||||
"Tesselation",
|
||||
"Texgen",
|
||||
"Tipfor",
|
||||
"Unmap",
|
||||
"Unqueue",
|
||||
"Unsignaled",
|
||||
"Vdpau",
|
||||
"Vec",
|
||||
"Vtc",
|
||||
"Writemask",
|
||||
"Writeonly",
|
||||
"Ycbaycr",
|
||||
"Ycbycr",
|
||||
"Ycrcb",
|
||||
"Ycbcr",
|
||||
"Ycrcba",
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
#if XAMCORE_2_0
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
using AppKit;
|
||||
#else
|
||||
using MonoMac;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.ObjCRuntime;
|
||||
using MonoMac.AppKit;
|
||||
#endif
|
||||
|
||||
namespace Introspection
|
||||
{
|
||||
|
||||
[TestFixture]
|
||||
public class MacApiTypoTest : ApiTypoTest
|
||||
{
|
||||
NSSpellChecker checker = new NSSpellChecker ();
|
||||
|
||||
[SetUp]
|
||||
public void SetUp ()
|
||||
{
|
||||
var sdk = new Version (Constants.SdkVersion);
|
||||
if (!PlatformHelper.CheckSystemVersion (sdk.Major, sdk.Minor))
|
||||
Assert.Ignore ("Typos only verified using the latest SDK");
|
||||
}
|
||||
|
||||
public override string GetTypo (string txt)
|
||||
{
|
||||
var checkRange = new NSRange (0, txt.Length);
|
||||
var typoRange = checker.CheckSpelling (txt, 0);
|
||||
if (typoRange.Length == 0)
|
||||
return String.Empty;
|
||||
return txt.Substring ((int)typoRange.Location, (int)typoRange.Length);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -114,6 +114,7 @@
|
|||
<Compile Include="..\..\common\TestRuntime.cs">
|
||||
<Link>TestRuntime.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="MacApiTypoTest.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\external\guiunit\src\framework\GuiUnit_NET_4_5.csproj">
|
||||
|
|
Загрузка…
Ссылка в новой задаче