diff options
author | Adeel Mujahid <3840695+am11@users.noreply.github.com> | 2022-08-02 00:56:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-02 00:56:33 +0300 |
commit | 2201016c1e13bdb9abf49e2e38cadf4ee0568df2 (patch) | |
tree | f7dd21b7ba36f4a0ddbdcd8da51fb1b71abf3785 /src/tests | |
parent | a67c1ad7eadcf9ce7a445358df287daf4a983086 (diff) |
Fix typos (#73122)
Diffstat (limited to 'src/tests')
23 files changed, 89 insertions, 89 deletions
diff --git a/src/tests/Common/scripts/lst_creator.py b/src/tests/Common/scripts/lst_creator.py index 76139a4a352..5699b21d7ce 100755 --- a/src/tests/Common/scripts/lst_creator.py +++ b/src/tests/Common/scripts/lst_creator.py @@ -284,7 +284,7 @@ def parse_lst_file(lst_file): def main(args): """ Main method Args: - args ([str]): the arugments passed to the program. + args ([str]): the arguments passed to the program. """ diff --git a/src/tests/CoreMangLib/system/delegate/delegate/delegatecombine1.cs b/src/tests/CoreMangLib/system/delegate/delegate/delegatecombine1.cs index 47a9d238eac..a6240e9e7bc 100644 --- a/src/tests/CoreMangLib/system/delegate/delegate/delegatecombine1.cs +++ b/src/tests/CoreMangLib/system/delegate/delegate/delegatecombine1.cs @@ -13,7 +13,7 @@ namespace DelegateTest public class DelegateCombine1 { - const string c_StartWrok = "Stark"; + const string c_StartWork = "Start"; const string c_Working = "Working"; enum identify_null { @@ -73,7 +73,7 @@ namespace DelegateTest try { - if (GetInvocationListFlag(identify_null.c_Start_null_false, identify_null.c_Working_null_false ) != c_StartWrok + c_Working) + if (GetInvocationListFlag(identify_null.c_Start_null_false, identify_null.c_Working_null_false ) != c_StartWork + c_Working) { TestLibrary.TestFramework.LogError("001", "delegate combine is not successful "); retVal = false; @@ -126,7 +126,7 @@ namespace DelegateTest try { - if (GetInvocationListFlag( identify_null.c_Start_null_false, identify_null.c_Working_null_true ) != c_StartWrok) + if (GetInvocationListFlag( identify_null.c_Start_null_false, identify_null.c_Working_null_true ) != c_StartWork) { TestLibrary.TestFramework.LogError("005", "delegate combine is not successful "); retVal = false; @@ -235,7 +235,7 @@ namespace DelegateTest booldelegate bd = (booldelegate)itr.Current; if (bd.Equals(delctor.starkWork)) { - sFlag += c_StartWrok; + sFlag += c_StartWork; } if (bd.Equals(delctor.working)) { @@ -247,7 +247,7 @@ namespace DelegateTest } } - //create testclass for provding test method and test target. + //create testclass for providing test method and test target. class TestClass { public bool StartWork_Bool() diff --git a/src/tests/CoreMangLib/system/delegate/delegate/delegatecombineimpl.cs b/src/tests/CoreMangLib/system/delegate/delegate/delegatecombineimpl.cs index f39818b4425..d61c6ca921d 100644 --- a/src/tests/CoreMangLib/system/delegate/delegate/delegatecombineimpl.cs +++ b/src/tests/CoreMangLib/system/delegate/delegate/delegatecombineimpl.cs @@ -12,7 +12,7 @@ namespace DelegateTest public class DelegateCombineImpl { - const string c_StartWrok = "Start"; + const string c_StartWork = "Start"; const string c_Working = "Working"; enum identify_null { @@ -208,14 +208,14 @@ namespace DelegateTest { delctor.starkWork = new booldelegate(testinstance.StartWork_Bool); combineImpl += (booldelegate)delctor.starkWork; - sFlagAdd = c_StartWrok; + sFlagAdd = c_StartWork; } else if (start == identify_null.c_Start_null_false_duplicate ) { delctor.starkWork = new booldelegate(testinstance.StartWork_Bool); combineImpl += (booldelegate)delctor.starkWork; - sFlagAdd = c_StartWrok; + sFlagAdd = c_StartWork; //The invocation list can contain duplicate entries; that is, entries that refer to the same method on the same object. combineImpl += (booldelegate)delctor.starkWork; sFlagAdd += sFlagAdd; @@ -248,7 +248,7 @@ namespace DelegateTest //the filter is to get the delegate which is appended through equals method. if (bd.Equals(delctor.starkWork)) { - sFlag += c_StartWrok; + sFlag += c_StartWork; } if (bd.Equals(delctor.working)) { @@ -264,7 +264,7 @@ namespace DelegateTest } } - //create testclass for provding test method and test target. + //create testclass for providing test method and test target. class TestClass { public bool StartWork_Bool() diff --git a/src/tests/CoreMangLib/system/delegate/delegate/delegateequals1.cs b/src/tests/CoreMangLib/system/delegate/delegate/delegateequals1.cs index 80a5e7dc05a..525deb2f27b 100644 --- a/src/tests/CoreMangLib/system/delegate/delegate/delegateequals1.cs +++ b/src/tests/CoreMangLib/system/delegate/delegate/delegateequals1.cs @@ -50,7 +50,7 @@ namespace DelegateTest public bool PosTest1() { bool retVal = true; - //Type,target, method, and invocation list + //Type,target, method, and invocation list TestLibrary.TestFramework.BeginScenario("PosTest1: Use one delegate object to instance the other delegate object,then use equals method to compare"); try @@ -97,7 +97,7 @@ namespace DelegateTest TestClass tcInstance = new TestClass(2); delctor.starkWork = new booldelegate(tcInstance.StartWork_Bool); booldelegate workDelegate = new booldelegate(tcInstance.StartWork_Bool); - + if (GetCompareResult(workDelegate, (booldelegate)delctor.starkWork)) { if (!workDelegate.Equals((booldelegate)delctor.starkWork)) @@ -113,7 +113,7 @@ namespace DelegateTest } workDelegate(); ((booldelegate)delctor.starkWork)(); - + } catch (Exception e) { @@ -179,7 +179,7 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("010", "Equals method return error "); retVal = false; } - + workDelegate(); ((booldelegate)delctor.starkWork)(); @@ -205,7 +205,7 @@ namespace DelegateTest DelegateEquals delctor = new DelegateEquals(); booldelegate workDelegate = new booldelegate(TestClass.Completed_Bool); booldelegate workDelegate1 = new booldelegate(TestClass1.Completed_Bool); - + if (workDelegate.Equals(workDelegate1)) { TestLibrary.TestFramework.LogError("014", "Equals method return error "); @@ -256,12 +256,12 @@ namespace DelegateTest return retVal; } - //compare delegate's Type,target, method, and invocation list + //compare delegate's Type,target, method, and invocation list //two delegates have common Type,target, method, and invocation list //return true.otherwise return false private bool GetCompareResult(booldelegate del1, booldelegate del2) { - + if (!del1.GetType().Equals(del2.GetType())) { return false; @@ -270,13 +270,13 @@ namespace DelegateTest { return false; } - + return true; } } - //create testclass for provding test method and test target. + //create testclass for providing test method and test target. class TestClass { private int id; diff --git a/src/tests/CoreMangLib/system/delegate/delegate/delegategethashcode1.cs b/src/tests/CoreMangLib/system/delegate/delegate/delegategethashcode1.cs index 8c0fa7e92d6..220491dfa1c 100644 --- a/src/tests/CoreMangLib/system/delegate/delegate/delegategethashcode1.cs +++ b/src/tests/CoreMangLib/system/delegate/delegate/delegategethashcode1.cs @@ -13,7 +13,7 @@ namespace DelegateTest public class DelegateGetHashCode { - + public static int Main() { DelegateGetHashCode DelegateGetHashCode = new DelegateGetHashCode(); @@ -67,7 +67,7 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("001", "HashCode is not excepted "); retVal = false; } - + workDelegate(); workDelegate1(); @@ -87,7 +87,7 @@ namespace DelegateTest public bool PosTest2() { bool retVal = true; - //Type,target, method, and invocation list + //Type,target, method, and invocation list TestLibrary.TestFramework.BeginScenario("PosTest2: hash code of two different delegate object even though they invoke the same function is not equal "); try @@ -132,7 +132,7 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("005", "HashCode is not excepted "); retVal = false; } - + workDelegate(); workDelegate1(); @@ -164,7 +164,7 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("007", "HashCode is not excepted "); retVal = false; } - + workDelegate(); workDelegate1(); @@ -191,7 +191,7 @@ namespace DelegateTest DelegateGetHashCode delctor = new DelegateGetHashCode(); booldelegate workDelegate = new booldelegate(TestClass.Completed_Bool); booldelegate workDelegate1 = new booldelegate(TestClass1.Completed_Bool); - + if (workDelegate.GetHashCode()!=workDelegate1.GetHashCode()) { TestLibrary.TestFramework.LogError("011", "HashCode is not excepted"); @@ -250,7 +250,7 @@ namespace DelegateTest public bool PosTest8() { bool retVal = true; - //Type,target, method, and invocation list + //Type,target, method, and invocation list TestLibrary.TestFramework.BeginScenario("PosTest8: hash code of two delegate object is not equal,the two delegate callback different function. "); try @@ -278,7 +278,7 @@ namespace DelegateTest } } - //create testclass for provding test method and test target. + //create testclass for providing test method and test target. class TestClass { private int id; @@ -306,7 +306,7 @@ namespace DelegateTest public void StartWork_Void() { TestLibrary.TestFramework.LogInformation("TestClass1's StartWork_Bool method is running. id=" + this.id); - + } } class TestClass1 @@ -318,7 +318,7 @@ namespace DelegateTest TestLibrary.TestFramework.LogInformation("TestClass1's StartWork_Bool method is running. id="+ this.id ); return true; } - + public static bool Working_Bool() { TestLibrary.TestFramework.LogInformation("TestClass1's Working_Bool method is running ."); diff --git a/src/tests/CoreMangLib/system/delegate/delegate/delegategetinvocationlist1.cs b/src/tests/CoreMangLib/system/delegate/delegate/delegategetinvocationlist1.cs index 7a3a5fde70d..b575ec23684 100644 --- a/src/tests/CoreMangLib/system/delegate/delegate/delegategetinvocationlist1.cs +++ b/src/tests/CoreMangLib/system/delegate/delegate/delegategetinvocationlist1.cs @@ -204,7 +204,7 @@ namespace DelegateTest } } - //create testclass for provding test method and test target. + //create testclass for providing test method and test target. class TestClass { public bool StartWork_Bool() diff --git a/src/tests/CoreMangLib/system/delegate/delegate/delegateremove.cs b/src/tests/CoreMangLib/system/delegate/delegate/delegateremove.cs index 1b121de7be5..7c27fdfedc5 100644 --- a/src/tests/CoreMangLib/system/delegate/delegate/delegateremove.cs +++ b/src/tests/CoreMangLib/system/delegate/delegate/delegateremove.cs @@ -66,14 +66,14 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("001", "remove failure " ); retVal = false; } - + } catch (Exception e) { TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e); retVal = false; } - + return retVal; } // Returns true if the expected result is right @@ -113,7 +113,7 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e); retVal = false; } - + return retVal; } // Returns true if the expected result is right @@ -155,7 +155,7 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e); retVal = false; } - + return retVal; } @@ -263,7 +263,7 @@ namespace DelegateTest delctor.starkWork += bWorking_Bool; delctor.starkWork += bCompleted_Bool; delctor.starkWork = (booldelegate)Delegate.Remove(delctor.starkWork, new voiddelegate(tcInstance.StartWork_Void)); - + TestLibrary.TestFramework.LogError("015", "delegate remove error "); retVal = false; } @@ -280,7 +280,7 @@ namespace DelegateTest return retVal; } } - //create testclass for provding test method and test target. + //create testclass for providing test method and test target. class TestClass { public bool StartWork_Bool() diff --git a/src/tests/CoreMangLib/system/delegate/delegate/delegateremoveimpl.cs b/src/tests/CoreMangLib/system/delegate/delegate/delegateremoveimpl.cs index 19b7d604df8..f14ff5523e4 100644 --- a/src/tests/CoreMangLib/system/delegate/delegate/delegateremoveimpl.cs +++ b/src/tests/CoreMangLib/system/delegate/delegate/delegateremoveimpl.cs @@ -63,14 +63,14 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("001", "remove failure " ); retVal = false; } - + } catch (Exception e) { TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e); retVal = false; } - + return retVal; } // Returns true if the expected result is right @@ -110,7 +110,7 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e); retVal = false; } - + return retVal; } // Returns true if the expected result is right @@ -136,7 +136,7 @@ namespace DelegateTest Delegate[] afterList = delctor.starkWork.GetInvocationList(); if (beforeList.Length != afterList.Length) { - TestLibrary.TestFramework.LogError("006", + TestLibrary.TestFramework.LogError("006", String.Format("Remove changed invocation list length from {0} to {1}", beforeList.Length, afterList.Length)); retVal = false; @@ -156,7 +156,7 @@ namespace DelegateTest TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e); retVal = false; } - + return retVal; } @@ -246,7 +246,7 @@ namespace DelegateTest return retVal; } } - //create testclass for provding test method and test target. + //create testclass for providing test method and test target. class TestClass { public bool StartWork_Bool() diff --git a/src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsByValArray/AsByValArrayTest.cs b/src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsByValArray/AsByValArrayTest.cs index e728712b3f9..c5246ea4451 100644 --- a/src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsByValArray/AsByValArrayTest.cs +++ b/src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsByValArray/AsByValArrayTest.cs @@ -260,7 +260,7 @@ public class C_BOOLArray_Seq #region Explicit -#region explicit stuct definition +#region explicit struct definition [StructLayout(LayoutKind.Explicit)] public struct S_INTArray_Exp { diff --git a/src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/FldDef_LPArray.cs b/src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/FldDef_LPArray.cs index 8ab86e61d00..2b844dea5d8 100644 --- a/src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/FldDef_LPArray.cs +++ b/src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/FldDef_LPArray.cs @@ -5,7 +5,7 @@ using System; using System.Runtime.InteropServices; #region Sequential -#region sequential stuct definition +#region sequential struct definition [StructLayout(LayoutKind.Sequential)] public struct S_INTArray_Seq { @@ -233,7 +233,7 @@ public class C_BOOLArray_Seq #region Explicit -#region explicit stuct definition +#region explicit struct definition [StructLayout(LayoutKind.Explicit)] public struct S_INTArray_Exp { diff --git a/src/tests/JIT/Directed/StructPromote/Unsafe/ReadDoubleFromIntOffset.cs b/src/tests/JIT/Directed/StructPromote/Unsafe/ReadDoubleFromIntOffset.cs index 03231db21f9..e9050b1452e 100644 --- a/src/tests/JIT/Directed/StructPromote/Unsafe/ReadDoubleFromIntOffset.cs +++ b/src/tests/JIT/Directed/StructPromote/Unsafe/ReadDoubleFromIntOffset.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // The test came from https://github.com/dotnet/runtime/issues/21860. -// It tests that we do access overlapping fields with the correct types. -// Espessialy if the stuct was casted by 'Unsafe.As` from a promoted type +// It tests that we do access overlapping fields with the correct types. +// Especially if the struct was casted by 'Unsafe.As` from a promoted type // and the promoted type had another field on the same offset but with a different type/size. using System.Runtime.CompilerServices; @@ -50,7 +50,7 @@ class TestReadIntAsDouble p.ulo = d.x; p.umid = d.y; // The jit gets field's type based on offset, so it will return `ulo` as int. - d.m = Unsafe.As<Dec, DecCalc1>(ref p).ulomidLE; + d.m = Unsafe.As<Dec, DecCalc1>(ref p).ulomidLE; } [StructLayout(LayoutKind.Explicit)] diff --git a/src/tests/JIT/Directed/StructPromote/Unsafe/ReadStructAsAnotherType.cs b/src/tests/JIT/Directed/StructPromote/Unsafe/ReadStructAsAnotherType.cs index ce853df7a29..0e7c23fa1bf 100644 --- a/src/tests/JIT/Directed/StructPromote/Unsafe/ReadStructAsAnotherType.cs +++ b/src/tests/JIT/Directed/StructPromote/Unsafe/ReadStructAsAnotherType.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // The test came from https://github.com/dotnet/runtime/issues/21860. -// It tests that we do access overlapping fields with the correct types. -// Espessialy if the stuct was casted by 'Unsafe.As` from a promoted type +// It tests that we do access overlapping fields with the correct types. +// Especially if the struct was casted by 'Unsafe.As` from a promoted type // and the promoted type had another field on the same offset but with a different type/size. using System.Runtime.CompilerServices; @@ -52,7 +52,7 @@ class TestAssignFieldsBetweenPromotedNotPromotedStructs public static ref NotPromotedStruct AsNotPromotedStruct(ref PromotedStruct d) => ref Unsafe.As<PromotedStruct, NotPromotedStruct>(ref d); } - // Some simple tests that check that lcl variables + // Some simple tests that check that lcl variables [MethodImpl(MethodImplOptions.NoInlining)] static void TestStructCasts() { diff --git a/src/tests/JIT/Performance/CodeQuality/Bytemark/numericsort.cs b/src/tests/JIT/Performance/CodeQuality/Bytemark/numericsort.cs index 246916c97f7..6646be45b2f 100644 --- a/src/tests/JIT/Performance/CodeQuality/Bytemark/numericsort.cs +++ b/src/tests/JIT/Performance/CodeQuality/Bytemark/numericsort.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. /* ** This program was translated to C# and adapted for xunit-performance. -** New variants of several tests were added to compare class versus +** New variants of several tests were added to compare class versus ** struct and to compare jagged arrays vs multi-dimensional arrays. */ @@ -23,7 +23,7 @@ ** are error-free. Consequently, McGraw-HIll and BYTE Magazine make ** no claims in regard to the fitness of the source code, executable ** code, and documentation of the BYTEmark. -** +** ** Furthermore, BYTE Magazine, McGraw-Hill, and all employees ** of McGraw-Hill cannot be held responsible for any damages resulting ** from the use of this code or the results obtained from using @@ -259,7 +259,7 @@ public class NumericSortJagged : SortStruct /************ ** NumSift ** ************* - ** Peforms the sift operation on a numeric array, + ** Performs the shift operation on a numeric array, ** constructing a heap in the array. */ private static void NumSift(int[] array, /* Array of numbers */ @@ -502,7 +502,7 @@ public class NumericSortRect : SortStruct /************ ** NumSift ** ************* - ** Peforms the sift operation on a numeric array, + ** Performs the shift operation on a numeric array, ** constructing a heap in the array. */ private static void NumSift(int[,] array, /* Array of numbers */ diff --git a/src/tests/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Intersections.cs b/src/tests/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Intersections.cs index 32536edb098..8feb8acdaff 100644 --- a/src/tests/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Intersections.cs +++ b/src/tests/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Intersections.cs @@ -34,8 +34,8 @@ internal struct Intersections { var cmp = Compare(dis, NullDistance, FloatComparisonMode.OrderedEqualNonSignaling); var zero = Vector256<int>.Zero; - // efficiently generate an all-one mask vector by lower latency AVX2 ComapreEqual - var mask = Avx2.CompareEqual(zero, zero); + // efficiently generate an all-one mask vector by lower latency AVX2 CompareEqual + var mask = Avx2.CompareEqual(zero, zero); return TestC(cmp, mask.AsSingle()); } diff --git a/src/tests/JIT/Performance/CodeQuality/SciMark/LU.cs b/src/tests/JIT/Performance/CodeQuality/SciMark/LU.cs index 4ae62a0f636..d0287701df5 100644 --- a/src/tests/JIT/Performance/CodeQuality/SciMark/LU.cs +++ b/src/tests/JIT/Performance/CodeQuality/SciMark/LU.cs @@ -139,7 +139,7 @@ namespace SciMark2 /// reordering of the rows of A during factorization. /// </param> /// <returns> - /// 0, if OK, nozero value, othewise. + /// 0, if OK, nozero value, otherwise. /// </returns> public static int factor(double[][] A, int[] pivot) { diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/TypeHierarchy/Generator/Program.cs b/src/tests/Loader/classloader/StaticVirtualMethods/TypeHierarchy/Generator/Program.cs index 20853821fd2..946d66607e1 100644 --- a/src/tests/Loader/classloader/StaticVirtualMethods/TypeHierarchy/Generator/Program.cs +++ b/src/tests/Loader/classloader/StaticVirtualMethods/TypeHierarchy/Generator/Program.cs @@ -431,7 +431,7 @@ namespace VirtualStaticInterfaceMethodTestGen break; default: - throw new Exception("Unkonwn interface approach"); + throw new Exception("Unknown interface approach"); } derivedType.Name = "Derived" + scenarioName + GenericTypeSuffix(scenario.DerivedTypeGenericParams); derivedType.GenericParams = scenario.DerivedTypeGenericParams; diff --git a/src/tests/Loader/classloader/regressions/GitHub_45600/repro.cs b/src/tests/Loader/classloader/regressions/GitHub_45600/repro.cs index 7835fc0a47a..86b425f52cc 100644 --- a/src/tests/Loader/classloader/regressions/GitHub_45600/repro.cs +++ b/src/tests/Loader/classloader/regressions/GitHub_45600/repro.cs @@ -94,9 +94,9 @@ class Program { static int Main(string[] args) { - var contaner = new G(); - contaner.RegisterNamedObjectType<B>(); - contaner.Register<B, D>(); + var container = new G(); + container.RegisterNamedObjectType<B>(); + container.Register<B, D>(); return 100; } } diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testapis.cs b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testapis.cs index 889403c4138..842db1275b9 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testapis.cs +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testapis.cs @@ -11,7 +11,7 @@ public class Driver<K, V> public void BasicAdd(K[] keys, V[] values) { ConditionalWeakTable<K,V> tbl = new ConditionalWeakTable<K,V>(); - + for (int i = 0; i < keys.Length; i++) { tbl.Add(keys[i], values[i]); @@ -23,7 +23,7 @@ public class Driver<K, V> // make sure TryGetValues return true, since the key should be in the table Test.Eval(tbl.TryGetValue(keys[i], out val), "Err_001 Expected TryGetValue to return true"); - + if ( val == null && values[i] == null ) { Test.Eval(true); @@ -44,7 +44,7 @@ public class Driver<K, V> (K[] keys, V[] values, int index, int repeat) { ConditionalWeakTable<K,V> tbl = new ConditionalWeakTable<K,V>(); - + for (int i = 0; i < keys.Length; i++) { tbl.Add(keys[i], values[i]); @@ -198,7 +198,7 @@ public class Driver<K, V> Test.Eval(false, "Err_12a Unknown type of key provided to CreateValue()"); return null; - + } public void VerifyValue(K key, V val) @@ -215,7 +215,7 @@ public class Driver<K, V> } else if (key is RefX1<string>) { - expectedVal = g_refStringDict[key as RefX1<string>] as V; + expectedVal = g_refStringDict[key as RefX1<string>] as V; } else { @@ -232,18 +232,18 @@ public class Driver<K, V> public void GetValueValidations(K[] keys, V[] values) { - ConditionalWeakTable<K,V>.CreateValueCallback valueCallBack = + ConditionalWeakTable<K,V>.CreateValueCallback valueCallBack = new ConditionalWeakTable<K,V>.CreateValueCallback(CreateValue); - + ConditionalWeakTable<K,V> tbl = new ConditionalWeakTable<K,V>(); K key = keys[0]; // Get key from an empty dictionary - // GetValue should return the new value generated from CreateValue() + // GetValue should return the new value generated from CreateValue() tbl.GetValue(key, valueCallBack); - // check that this opeartion added the (key,value) pair to the dictionary + // check that this operation added the (key,value) pair to the dictionary V val; Test.Eval(tbl.TryGetValue(key, out val)); @@ -339,7 +339,7 @@ public class Driver<K, V> V[] values = new V[keys.Length]; ConditionalWeakTable<K,V> tbl = new ConditionalWeakTable<K,V>(); - + // assume additions for all values for (int i = 0; i < keys.Length; i++) { @@ -352,7 +352,7 @@ public class Driver<K, V> // make sure TryGetValues return true, since the key should be in the table Test.Eval(tbl.TryGetValue(keys[i], out val), "Err_018 Expected TryGetValue to return true"); - + if (val == null || !val.Equals(values[i])) { // only one of the values is null or the values don't match @@ -365,7 +365,7 @@ public class Driver<K, V> public void BasicAddThenGetOrCreateValue(K[] keys, V[] values) { ConditionalWeakTable<K,V> tbl = new ConditionalWeakTable<K,V>(); - + // assume additions for all values for (int i = 0; i < keys.Length; i++) { @@ -378,7 +378,7 @@ public class Driver<K, V> // make sure GetOrCreateValues the value added (and not a new object) val = tbl.GetOrCreateValue(keys[i]); - + if (val == null || !val.Equals(values[i])) { // only one of the values is null or the values don't match @@ -446,7 +446,7 @@ public class TestAPIs { // test for ConditionalWeakTable<string> Driver<string,string> stringDriver = new Driver<string,string>(); - + string[] stringArr = new string[100]; for (int i = 0; i < 100; i++) { @@ -498,7 +498,7 @@ public class TestAPIs //=============================================================== // this method generates a dictionary with keys and values to be used for GetValue() method testing - stringDriver.GenerateValuesForStringKeys(stringArr); + stringDriver.GenerateValuesForStringKeys(stringArr); stringDriver.GetValueValidations(stringArr, stringArr); Driver<RefX1<int>, string> refIntDriver2 = new Driver<RefX1<int>, string>(); diff --git a/src/tests/ilverify/TestDataLoader.cs b/src/tests/ilverify/TestDataLoader.cs index f1bd1a2047f..dbf901bf2b2 100644 --- a/src/tests/ilverify/TestDataLoader.cs +++ b/src/tests/ilverify/TestDataLoader.cs @@ -60,13 +60,13 @@ namespace ILVerification.Tests { if (mparams[1] == "InvalidType") { - var verificationErros = new List<VerifierError>(); + var verificationErrors = new List<VerifierError>(); foreach (var expectedError in mparams[2].Split('@')) { - verificationErros.Add((VerifierError)Enum.Parse(typeof(VerifierError), expectedError)); + verificationErrors.Add((VerifierError)Enum.Parse(typeof(VerifierError), expectedError)); } var newItem = new InvalidTypeTestCase { MetadataToken = MetadataTokens.GetToken(typeDefinitionHandle) }; - newItem.ExpectedVerifierErrors = verificationErros; + newItem.ExpectedVerifierErrors = verificationErrors; return newItem; } return null; @@ -139,13 +139,13 @@ namespace ILVerification.Tests if (mparams.Length == 3 && mparams[1] == "Invalid") { var expectedErrors = mparams[2].Split('.'); - var verificationErros = new List<VerifierError>(); + var verificationErrors = new List<VerifierError>(); foreach (var item in expectedErrors) { if (Enum.TryParse(item, out VerifierError expectedError)) { - verificationErros.Add(expectedError); + verificationErrors.Add(expectedError); } } @@ -153,7 +153,7 @@ namespace ILVerification.Tests if (expectedErrors.Length > 0) { - newItem.ExpectedVerifierErrors = verificationErros; + newItem.ExpectedVerifierErrors = verificationErrors; } return newItem; diff --git a/src/tests/nativeaot/SmokeTests/Dataflow/Dataflow.cs b/src/tests/nativeaot/SmokeTests/Dataflow/Dataflow.cs index 833127b5596..8637946527a 100644 --- a/src/tests/nativeaot/SmokeTests/Dataflow/Dataflow.cs +++ b/src/tests/nativeaot/SmokeTests/Dataflow/Dataflow.cs @@ -6,7 +6,7 @@ using System.Reflection; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -#pragma warning disable 649 // 'blah' is never assgined to +#pragma warning disable 649 // 'blah' is never assigned to #pragma warning disable 169 // 'blah' is never used #pragma warning disable 436 // conflicting type diff --git a/src/tests/nativeaot/SmokeTests/UnitTests/Generics.cs b/src/tests/nativeaot/SmokeTests/UnitTests/Generics.cs index d4cbf70d8d9..ca0aa06e5a3 100644 --- a/src/tests/nativeaot/SmokeTests/UnitTests/Generics.cs +++ b/src/tests/nativeaot/SmokeTests/UnitTests/Generics.cs @@ -809,7 +809,7 @@ class Generics s_NumErrors++; } - // Uncomment when we have the type loader to buld invoke stub dictionaries. + // Uncomment when we have the type loader to build invoke stub dictionaries. { MethodInfo mi = typeof(Foo<string>).GetTypeInfo().GetDeclaredMethod("SetAndCheck").MakeGenericMethod(typeof(object)); if ((bool)mi.Invoke(o, new object[] { 123, new object() })) diff --git a/src/tests/readytorun/tests/generics.cs b/src/tests/readytorun/tests/generics.cs index c005b33ba21..d4dc2acd79c 100644 --- a/src/tests/readytorun/tests/generics.cs +++ b/src/tests/readytorun/tests/generics.cs @@ -1045,7 +1045,7 @@ class Program s_NumErrors++; } - // Uncomment when we have the type loader to buld invoke stub dictionaries. + // Uncomment when we have the type loader to build invoke stub dictionaries. { MethodInfo mi = typeof(Foo<string>).GetMethod("SetAndCheck").MakeGenericMethod(typeof(object)); if ((bool)mi.Invoke(o, new object[] { 123, new object() })) @@ -2990,7 +2990,7 @@ public class GenBase<T, U> : IFoo<T> where T : new() var f = new MyGenClass3<T>[5,13]; return "NewTest - " + a + " - " + b + " - " + c + " - " + d + " - " + e + " - " + f; } - + [MethodImpl(MethodImplOptions.NoInlining)] public string BoxingAndNullableTest(MyGenClass1<KeyValuePair<T,U>> t, MyGenStruct1<Dictionary<T,U>> u, MyGenStruct1<Dictionary<T,U>>? u2) { diff --git a/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClientExceptions.cs b/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClientExceptions.cs index 5afcdbb54b6..b6b044f1e4b 100644 --- a/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClientExceptions.cs +++ b/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClientExceptions.cs @@ -16,7 +16,7 @@ namespace Microsoft.Diagnostics.NETCore.Client public UnsupportedProtocolException(string msg) : base(msg) {} } - // When the runtime is no longer availble for attaching. + // When the runtime is no longer available for attaching. public class ServerNotAvailableException : DiagnosticsClientException { public ServerNotAvailableException(string msg) : base(msg) {} |