Skip to content

Commit

Permalink
fix: Remove usings from MutantControl (#2694)
Browse files Browse the repository at this point in the history
chore: remove usings from MutantControl

Co-authored-by: Rouke Broersma <[email protected]>
  • Loading branch information
dupdob and rouke-broersma authored Sep 29, 2023
1 parent 579f32a commit 03f9913
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/Stryker.Core/Stryker.Core/InjectedHelpers/MutantControl.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Stryker
{
internal static class MutantControl
{
private static List<int> _coveredMutants;
private static List<int> _coveredStaticdMutants;
private static System.Collections.Generic.List<int> _coveredMutants;
private static System.Collections.Generic.List<int> _coveredStaticdMutants;
private static string envName;
private static Object _coverageLock = new Object();
private static System.Object _coverageLock = new System.Object();

// this attribute will be set by the Stryker Data Collector before each test
public static bool CaptureCoverage;
Expand All @@ -28,21 +24,21 @@ public static void InitCoverage()

public static void ResetCoverage()
{
_coveredMutants = new List<int>();
_coveredStaticdMutants = new List<int>();
_coveredMutants = new System.Collections.Generic.List<int>();
_coveredStaticdMutants = new System.Collections.Generic.List<int>();
}

public static IList<int>[] GetCoverageData()
public static System.Collections.Generic.IList<int>[] GetCoverageData()
{
IList<int>[] result = new IList<int>[]{_coveredMutants, _coveredStaticdMutants};
System.Collections.Generic.IList<int>[] result = new System.Collections.Generic.IList<int>[]{_coveredMutants, _coveredStaticdMutants};
ResetCoverage();
return result;
}

private static void CurrentDomain_ProcessExit(object sender, EventArgs e)
private static void CurrentDomain_ProcessExit(object sender, System.EventArgs e)
{
GC.KeepAlive(_coveredMutants);
GC.KeepAlive(_coveredStaticdMutants);
System.GC.KeepAlive(_coveredMutants);
System.GC.KeepAlive(_coveredStaticdMutants);
}

// check with: Stryker.MutantControl.IsActive(ID)
Expand All @@ -55,7 +51,7 @@ public static bool IsActive(int id)
}
if (ActiveMutant == ActiveMutantNotInitValue)
{
string environmentVariable = Environment.GetEnvironmentVariable("ActiveMutation");
string environmentVariable = System.Environment.GetEnvironmentVariable("ActiveMutation");
if (string.IsNullOrEmpty(environmentVariable))
{
ActiveMutant = -1;
Expand Down

0 comments on commit 03f9913

Please sign in to comment.