Skip to content

Commit 380fe6a

Browse files
authored
Rename attribute to exclude types (#226)
***NO_CI***
1 parent fef2df8 commit 380fe6a

File tree

66 files changed

+262
-246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+262
-246
lines changed

Tests/NFUnitTestArithmetic/UnitTestExpressionTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2488,7 +2488,7 @@ public static int Main_old()
24882488
{
24892489
int MyInt = TC.IntI;
24902490
}
2491-
catch (System.Exception)
2491+
catch (Exception)
24922492
{
24932493
RetInt = 0;
24942494
}
@@ -2520,7 +2520,7 @@ public static int Main_old()
25202520
{
25212521
int TempInt = getTC.IntI;
25222522
}
2523-
catch (System.Exception)
2523+
catch (Exception)
25242524
{
25252525
RetInt = 0;
25262526
}

Tests/NFUnitTestArithmetic/UnitTestOtherArithmeticTests.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System;
45
using nanoFramework.TestFramework;
56

67
namespace NFUnitTestArithmetic
@@ -7086,7 +7087,7 @@ public static int Main_old()
70867087
{
70877088
string s = "hello";
70887089
object o = s;
7089-
if ((o as System.Array) == null)
7090+
if ((o as Array) == null)
70907091
{
70917092
return 0;
70927093
}
@@ -7106,7 +7107,7 @@ public static int Main_old()
71067107
{
71077108
string[] s = new string[] { "hello" };
71087109
object o = s;
7109-
if ((o as System.Array) != null)
7110+
if ((o as Array) != null)
71107111
{
71117112
return 0;
71127113
}
@@ -7126,7 +7127,7 @@ public static int Main_old()
71267127
{
71277128
string[] s = new string[] { "hello" };
71287129
object o = s;
7129-
if ((o as System.Array) as System.Array != null)
7130+
if ((o as Array) as Array != null)
71307131
{
71317132
return 0;
71327133
}
@@ -7146,7 +7147,7 @@ public static int Main_old()
71467147
{
71477148
string[] s = new string[] { "hello" };
71487149
object o = s;
7149-
if ((o as System.Array) as object != null)
7150+
if ((o as Array) as object != null)
71507151
{
71517152
return 0;
71527153
}

Tests/NFUnitTestArray/UnitTestOtherTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public static int Main_old()
167167
MyClass[] a = new MyClass[] { new MyClass(5), new MyClass(6), new MyClass(7) };
168168

169169

170-
System.Array SystemArray;
170+
Array SystemArray;
171171
int[] StaticArray = new int[] { 10, 20, 30, 40 };
172172
// There exists an implicit reference conversion for this
173173
SystemArray = StaticArray;
@@ -187,7 +187,7 @@ class Other_TestClass_systemarrays_conversion_02
187187
{
188188
public static int Main_old()
189189
{
190-
System.Array SystemArray;
190+
Array SystemArray;
191191
int[] StaticArray = new int[] { 10, 20, 30, 40 };
192192
int[] StaticArray2 = new int[] { 1, 2, 3, 4 };
193193
SystemArray = StaticArray;
@@ -211,7 +211,7 @@ class Other_TestClass_systemarrays_nullvalue_01
211211
{
212212
public static int Main_old()
213213
{
214-
System.Array SystemArray;
214+
Array SystemArray;
215215
SystemArray = null;
216216
return 0;
217217
}
@@ -237,7 +237,7 @@ public static int Main_old()
237237
{
238238
Fill(strings, 90, 10, 0);
239239
}
240-
catch (System.Exception)
240+
catch (Exception)
241241
{
242242
return 0;
243243
}
@@ -265,7 +265,7 @@ public static int Main_old()
265265
{
266266
objectArr[1] = new Queue();
267267
}
268-
catch (System.Exception)
268+
catch (Exception)
269269
{
270270
return 0;
271271
}

Tests/NFUnitTestArray/UnitTestSimpleTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ public static int Main_old()
11861186
{//bug 16823
11871187
//int[] arr = new int[2147483647];
11881188
}
1189-
catch (System.Exception)
1189+
catch (Exception)
11901190
{
11911191
// Out Of Memory System.Exception
11921192
}
@@ -1205,7 +1205,7 @@ public static int Main_old()
12051205
{//bug 16823
12061206
//int[] arr = new int[2147483648];
12071207
}
1208-
catch (System.Exception)
1208+
catch (Exception)
12091209
{
12101210
return 0;
12111211
}
@@ -2764,7 +2764,7 @@ public static int Main_old()
27642764
{
27652765
arr[-1] = 5;
27662766
}
2767-
catch (System.Exception)
2767+
catch (Exception)
27682768
{
27692769
return 0;
27702770
}
@@ -2784,7 +2784,7 @@ public static int Main_old()
27842784
{
27852785
arr[10] = 5;
27862786
}
2787-
catch (System.Exception)
2787+
catch (Exception)
27882788
{
27892789
return 0;
27902790
}
@@ -3269,7 +3269,7 @@ public static int Main_old()
32693269
if (arr[2] == 3)
32703270
return 1;
32713271
}
3272-
catch (System.Exception)
3272+
catch (Exception)
32733273
{
32743274
return 0;
32753275
}

Tests/NFUnitTestAttributes/UnitTestAttributesTest1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public static bool testMethod()
372372
}
373373
}
374374

375-
[GuidAttribute("00020810-0000-0000-C000-000000000046")]
375+
[Guid("00020810-0000-0000-C000-000000000046")]
376376
struct Attrib_TestClass_attrib021_4_C1 { }
377377
public class Attrib_TestClass_attrib021_4
378378
{

Tests/NFUnitTestBasicConcepts/UnitTestBasicConceptsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4585,7 +4585,7 @@ public class Basic_TestClass_memac025 : Basic_TestClass_memac025_O
45854585
{
45864586
public static int Main_old()
45874587
{
4588-
Basic_TestClass_memac025_O.Basic_TestClass_memac025_C1 tc = new Basic_TestClass_memac025_O.Basic_TestClass_memac025_C1();
4588+
Basic_TestClass_memac025_C1 tc = new Basic_TestClass_memac025_C1();
45894589
if (tc.intI == 2)
45904590
{
45914591
return 0;

Tests/NFUnitTestClasses/UnitTestDeclarationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,10 @@ class BaseClassTestClass25 : BaseClassTestClass25_Base1.BaseClassTestClass25_Sub
412412
public static bool testMethod()
413413
{
414414
BaseClassTestClass25 m = new BaseClassTestClass25();
415-
if ((BaseClassTestClass25_Base1.BaseClassTestClass25_Sub2)m == null)
415+
if ((BaseClassTestClass25_Sub2)m == null)
416416
return false;
417417

418-
if ((BaseClassTestClass25_Base1.BaseClassTestClass25_Interface1)m == null)
418+
if ((BaseClassTestClass25_Interface1)m == null)
419419
return false;
420420
return true;
421421
}

Tests/NFUnitTestClasses/UnitTestFieldTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System;
45
using nanoFramework.TestFramework;
56

67
namespace NFUnitTestClasses
@@ -682,7 +683,7 @@ public static bool testMethod()
682683
{
683684
int intJ = test.tc.intI; //MyTest hasn't been instantiated
684685
}
685-
catch (System.Exception e)
686+
catch (Exception e)
686687
{
687688
RetVal = true;
688689
}

Tests/NFUnitTestClasses/UnitTestMethodsTests.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System;
45
using nanoFramework.TestFramework;
56

67
namespace NFUnitTestClasses
@@ -3156,7 +3157,7 @@ public class MethodsTestClass159
31563157
{
31573158
public long RetVal()
31583159
{
3159-
throw new System.Exception();
3160+
throw new Exception();
31603161
}
31613162
public static bool testMethod()
31623163
{
@@ -3187,7 +3188,7 @@ public long RetVal(bool b)
31873188
}
31883189
else
31893190
{
3190-
throw new System.Exception();
3191+
throw new Exception();
31913192
}
31923193
}
31933194
public static bool testMethod()
@@ -3202,7 +3203,7 @@ public static bool testMethod()
32023203
{
32033204
test.RetVal(false);
32043205
}
3205-
catch (System.Exception e)
3206+
catch (Exception e)
32063207
{
32073208
val = true;
32083209
}
@@ -3219,7 +3220,7 @@ public long RetVal(bool b)
32193220

32203221
if (b == true)
32213222
{
3222-
throw new System.Exception();
3223+
throw new Exception();
32233224
}
32243225
else
32253226
{
@@ -3238,7 +3239,7 @@ public static bool testMethod()
32383239
{
32393240
test.RetVal(true);
32403241
}
3241-
catch (System.Exception e)
3242+
catch (Exception e)
32423243
{
32433244
val = true;
32443245
}

Tests/NFUnitTestClasses/UnitTestPropertiesTests.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System;
45
using nanoFramework.TestFramework;
56

67
namespace NFUnitTestClasses
@@ -1160,7 +1161,7 @@ public int MyProp
11601161
{
11611162
get
11621163
{
1163-
throw new System.Exception();
1164+
throw new Exception();
11641165
}
11651166
}
11661167
public static bool testMethod()
@@ -1170,7 +1171,7 @@ public static bool testMethod()
11701171
{
11711172
int intJ = test.MyProp;
11721173
}
1173-
catch (System.Exception e)
1174+
catch (Exception e)
11741175
{
11751176
return true;
11761177
}
@@ -1190,7 +1191,7 @@ public int MyProp
11901191
}
11911192
else
11921193
{
1193-
throw new System.Exception();
1194+
throw new Exception();
11941195
}
11951196
}
11961197
}
@@ -1210,7 +1211,7 @@ public static bool testMethod()
12101211
{
12111212
int intJ = MC2.MyProp;
12121213
}
1213-
catch (System.Exception e)
1214+
catch (Exception e)
12141215
{
12151216
return true;
12161217
}

0 commit comments

Comments
 (0)