Skip to content

Commit

Permalink
Fix style nits; add more copyright headers
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdageek committed May 10, 2021
1 parent b5b2b81 commit b3347f2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Reflection.Metadata.ApplyUpdate.Test
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Reflection.Metadata.ApplyUpdate.Test
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Reflection.Metadata.ApplyUpdate.Test
{
Expand Down
5 changes: 2 additions & 3 deletions src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ namespace System.Reflection.Metadata
[ConditionalClass(typeof(ApplyUpdateUtil), nameof (ApplyUpdateUtil.IsSupported))]
public class ApplyUpdateTest
{

[Fact]
void StaticMethodBodyUpdate()
{
ApplyUpdateUtil.TestCase(static () => {
ApplyUpdateUtil.TestCase(static () =>
{
var assm = typeof (ApplyUpdate.Test.MethodBody1).Assembly;

var r = ApplyUpdate.Test.MethodBody1.StaticMethod1();
Expand All @@ -38,6 +38,5 @@ void StaticMethodBodyUpdate()
Assert.Equal ("NEWEST STRING", r);
});
}

}
}
12 changes: 6 additions & 6 deletions src/libraries/System.Runtime.Loader/tests/ApplyUpdateUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@

namespace System.Reflection.Metadata
{

public class ApplyUpdateUtil {
internal const string DotNetModifiableAssembliesSwitch = "DOTNET_MODIFIABLE_ASSEMBLIES";
internal const string DotNetModifiableAssembliesValue = "debug";


[CollectionDefinition("NoParallelTests", DisableParallelization = true)]
public class NoParallelTests { }


/// Whether ApplyUpdate is supported by the environment, test configuration, and runtime.
///
/// We need:
Expand Down Expand Up @@ -74,7 +71,7 @@ internal static bool IsSupportedTestConfiguration()
#endif
}

private static System.Collections.Generic.Dictionary<Assembly, int> assembly_count = new ();
private static System.Collections.Generic.Dictionary<Assembly, int> assembly_count = new();

internal static void ApplyUpdate (System.Reflection.Assembly assm)
{
Expand Down Expand Up @@ -115,11 +112,14 @@ internal static void AddRemoteInvokeOptions (ref RemoteInvokeOptions options)
public static void TestCase(Action testBody,
RemoteInvokeOptions options = null)
{
if (UseRemoteExecutor) {
if (UseRemoteExecutor)
{
Console.Error.WriteLine ($"Running test using RemoteExecutor");
AddRemoteInvokeOptions(ref options);
RemoteExecutor.Invoke(testBody, options).Dispose();
} else {
}
else
{
Console.Error.WriteLine($"Running test using direct invoke");
testBody();
}
Expand Down

0 comments on commit b3347f2

Please sign in to comment.