Skip to content

Commit 612ead3

Browse files
committed
Code style fixes
***NO_CI***
1 parent c785652 commit 612ead3

26 files changed

+79
-130
lines changed

source/TestAdapter/DeploymentAssembly.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// See LICENSE file in the project root for full license information.
4-
//
5-
6-
using System.Collections.Generic;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
73

84
namespace nanoFramework.TestPlatform.TestAdapter
95
{

source/TestAdapter/Discover.cs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

7-
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
8-
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
9-
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
10-
using nanoFramework.TestAdapter;
11-
using nanoFramework.TestFramework;
124
using System;
135
using System.Collections.Generic;
146
using System.IO;
157
using System.Linq;
168
using System.Reflection;
179
using System.Runtime.InteropServices;
1810
using System.Text.RegularExpressions;
11+
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
12+
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
13+
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
14+
using nanoFramework.TestAdapter;
15+
using nanoFramework.TestFramework;
1916

2017
namespace nanoFramework.TestPlatform.TestAdapter
2118
{

source/TestAdapter/LogMessenger.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
85
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;

source/TestAdapter/NanoCLRHelper.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// See LICENSE file in the project root for full license information.
4-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
53

6-
using CliWrap;
7-
using CliWrap.Buffered;
8-
using nanoFramework.TestPlatform.TestAdapter;
9-
using Newtonsoft.Json;
104
using System;
115
using System.ComponentModel;
126
using System.Net;
137
using System.Text.RegularExpressions;
148
using System.Threading;
9+
using CliWrap;
10+
using CliWrap.Buffered;
11+
using nanoFramework.TestPlatform.TestAdapter;
12+
using Newtonsoft.Json;
1513

1614
namespace nanoFramework.TestAdapter
1715
{

source/TestAdapter/Settings.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85
using System.Xml;

source/TestAdapter/SettingsProvider.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

4+
using System.Xml;
75
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
86
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
9-
using System.Xml;
107

118
namespace nanoFramework.TestPlatform.TestAdapter
129
{

source/TestAdapter/TestObjectHelper.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System.IO;
85
using System.Linq;
@@ -28,7 +25,7 @@ public static string GetNanoClrLocation()
2825
{
2926
return nanoClrFullPath;
3027
}
31-
28+
3229
var inititialDir = new DirectoryInfo(Path.GetDirectoryName(thisAssemblyDir));
3330
return FindNanoClr(inititialDir);
3431
}

source/TestAdapter/TestsConstants.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
namespace nanoFramework.TestPlatform.TestAdapter
85
{

source/TestFramework/Assert.AreEqual.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Diagnostics.CodeAnalysis;
36
using System.Runtime.CompilerServices;
47
using TestFrameworkShared;

source/TestFramework/Assert.AreNotEqual.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Diagnostics.CodeAnalysis;
36
using System.Runtime.CompilerServices;
47
using TestFrameworkShared;

source/TestFramework/Assert.Obsolete.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
25
using System.Collections;
36
using TestFrameworkShared;
47

source/TestFramework/Assert.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85
using System.Diagnostics.CodeAnalysis;
@@ -18,7 +15,7 @@ public sealed partial class Assert
1815
{
1916
private const string ObjectAsString = "(object)";
2017
private const string NullAsString = "(null)";
21-
18+
2219
/// <summary>
2320
/// Tests whether the specified objects refer to different objects and throws an exception if the two inputs refer to the same object.
2421
/// </summary>
@@ -53,7 +50,7 @@ public static void AreSame(object expected, object actual, [CallerArgumentExpres
5350
if (expected is ValueType || actual is ValueType)
5451
{
5552
HandleFail("Assert.AreSame", $"Do not pass value types to AreSame(). Values converted to Object will never be the same. Consider using AreEqual(). {ReplaceNulls(message)}");
56-
53+
5754
}
5855

5956
HandleFail("Assert.AreSame", ReplaceNulls(message));
@@ -160,9 +157,9 @@ public static void IsInstanceOfType(object value, Type expected, [CallerArgument
160157
}
161158

162159
// ReSharper disable once MergeConditionalExpression
163-
#pragma warning disable IDE0031 // IDE keeps suggesting I change this to value?.GetType() but since we don't have Nullable<T> this won't work in all cases.
160+
#pragma warning disable IDE0031 // IDE keeps suggesting I change this to value?.GetType() but since we don't have Nullable<T> this won't work in all cases.
164161
var actual = value is null ? null : value.GetType();
165-
#pragma warning restore IDE0031
162+
#pragma warning restore IDE0031
166163

167164
HandleFail("Assert.IsInstanceOfType", $"Expected type:<{expected}>. Actual type:<{ReplaceNulls(actual)}>. {ReplaceNulls(message)}");
168165
}
@@ -283,7 +280,7 @@ public static void ThrowsException(Type exception, Action action, [CallerArgumen
283280
{
284281
return;
285282
}
286-
283+
287284
HandleFail("Assert.ThrowsException", $"Threw exception {ex.GetType().Name}, but exception {exception.Name} was expected. {ReplaceNulls(message)}\r\nException Message: {ex.Message}");
288285
}
289286

@@ -299,7 +296,7 @@ internal static void HandleFail(string assertion, string message)
299296
{
300297
safeMessage = ReplaceNulls(message);
301298
}
302-
299+
303300
throw new AssertFailedException($"{assertion} failed. {safeMessage}");
304301
}
305302

source/TestFramework/CollectionAssert.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
////
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
////
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74

85
using System.Collections;

source/TestFramework/OutputHelper.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// See LICENSE file in the project root for full license information.
4-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
53

64
namespace nanoFramework.TestFramework
75
{

source/TestFramework/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System.Reflection;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System.Reflection;
25
using System.Runtime.InteropServices;
36

47
// General Information about an assembly is controlled through the following

source/TestFramework/TestExtensions.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85

source/TestFrameworkShared/AssertFailedException.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
////
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
////
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85

source/TestFrameworkShared/CleanupAttribute.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85

source/TestFrameworkShared/DataRowAttribute.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85

source/TestFrameworkShared/Helper.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
6-
7-
using System.Reflection;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
83

94
namespace nanoFramework.TestFramework
105
{

source/TestFrameworkShared/SetupAttribute.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85

source/TestFrameworkShared/SkipTestException.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85

source/TestFrameworkShared/TestClassAttribute.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85

source/TestFrameworkShared/TestMethodAttribute.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
85

source/UnitTestLauncher/Program.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
//
2-
// Copyright (c) .NET Foundation and Contributors
3-
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4-
// See LICENSE file in the project root for full license information.
5-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
63

74
using System;
8-
using System.Diagnostics;
95
using System.Reflection;
106

117
namespace nanoFramework.TestFramework

source/UnitTestLauncher/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System.Reflection;
35
using System.Runtime.InteropServices;
46

57
// General Information about an assembly is controlled through the following

0 commit comments

Comments
 (0)